OnionJack
OnionJack

Reputation: 160

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've been searching in Google Groups as well as StackOverflow without further luck:

What am I doing wrong and how can I find out the reason for the job failure?

EDIT: Removed some search links.

Upvotes: 0

Views: 323

Answers (1)

OnionJack
OnionJack

Reputation: 160

Okay, the reason it's failed is that I have 2 services on the same project, the default and another one with the endpoint that I actually wanted to to invoke. By using the 'target' property in cron.yaml I can specify the service, and now it reports Success. I can confirm that the service did receive a request and it's from one of the IPs that I've white-listed.

Upvotes: 0

Related Questions