How to debug cron job targeting AppEngine Flexible?
I'm trying to setup a cronjob in Google Cloud. I've used the tutorial.
My cron.yaml looks as such:
cron:
- description: "daily start"
url: /api/mycontroller/analyze
schedule: every 5 minutes from 18:00 to 19:00
However, the result is that the job status is Failed.
My observations so far:
- I see the job registered in my console -> AppEngine -> Task Queues -> Cron Jobs tab.
- The url is targeting an AppEngine Flexible ASP.NET service.
- Thus I assume that the url is the relative url of the service. If I specify the full URL then I get an error while deploying the cron.yaml saying that it doesn't match the regex ^(?:^/.*$)$
- In Fiddler I have confirmed that the url works with both http and https using GET. The endpoint returns HTTP status code 200.
- I do not check for the X-Appengine-Cron header in the code.
- I have whitelisted both IP addresses in the firewall.
- In the log (https://console.cloud.google.com/logs), filtered on "GAE Application", I can see my Fiddler request to the endpoint but I don't see anything coming from cron, even when running the job manually in the Cron Jobs tab.
- If I click the View button in the Cron Jobs tab to see logs then I am led to the /logs page with the filters below. However, it shows no log entries at all.
protoPayload.taskName="178eeebae17ee10ec3bc8d53b6xxxxxx"
protoPayload.taskQueueName="__cron"
- I've specified a random url in the cron.yaml for which I know there exists no valid endpoint in my ASP.NET and I get the same behavior as above.
I've been searching in Google Groups as well as StackOverflow without further luck:
- I've seen some posts mentioning about creating a handler (a special method?) in the service but that only applieso the Standard Environment and it's not mentioned in the tutorial at all.
- I've also seen some people mentioning about cron log in the console (or the lack of) but I can't find that file or anything interesting in /var/log/messages and /var/log/syslog
What am I doing wrong and how can I find out the reason for the job failure?
EDIT: Removed some search links.