1
votes

I have been managing cron jobs in a Google App Engine project without trouble until now but I've been unable to add a new cron job in the last few days.

I have noticed that the old dashboard, "App Engine Cron Jobs", now has the message:

This page will be disabled soon. The cron jobs are now visible under Cloud Scheduler. Please visit it to ensure that the Cloud Scheduler API is enabled on the project, and that you are granted the required roles/cloudscheduler.viewer IAM role.

I have checked that the API is enabled and that I have the appropriate role grants.

When looking at the new dashboard, "Cloud Scheduler - App Engine Cron Jobs", I have noticed that the new job does not have the "App Engine host" set, where the other jobs do.

I am trying to add the cron job by way of the YAML cron configuration file and gcloud app deploy cron.yaml. I have tried specifying the target for the job but that had no effect. I have tried adding a new job with exactly the same parameters as a known working job but that also failed.

Has anyone else experienced issues adding Google App Engine cron jobs recently?

Can anyone offer any suggestions on what I might try to fix the issue?

3

3 Answers

3
votes

Yes, I noticed the exact same problem.

New crons did not work at all, when running them, they failed but no logs anywhere.

It might be related from the to moving to Cloud Scheduler, it seems like Cloud Scheduler does not add same headers as App Engine cron does, so for new ones the logic needs to be changed, unless it fixed soon.

Making the Cron job as POST method and adding identifier inside body, would be a quick fix for this one.

0
votes

We had the same issue, I searched around and saw a support notice, changing the tools to 324.0.0 fixed our issues


Affected products: Cloud Tasks

Status: Confirmed

Description: We are experiencing an issue with Cloud Tasks

Start time: January 29, 2021 at 7:04:20 AM GMT-8

How to diagnose: Cron jobs run with the latest gcloud SDK v325.0.0 may see failures.

Workaround: Rollback to gcloud SDK v324.0.0 (gcloud components update --version=324.0.0) and redeploying the cron job should resolve the issue.

Update(s): January 29, 2021 at 3:40:09 PM GMT-8 Kindly use gcloud SDK v324.0.0 to deploy the cron jobs as a workaround while we work to mitigate the issue for gcloud SDK v325.0.0. Mitigation work is still underway by our engineering team. Estimated ETA for mitigation at this point is the next gcloud SDK release on Tuesday, 2021-02-02.

0
votes

Changing the tools to 324.0.0 as mentioned by John Cwikla worked.

If you are using maven and you deploy the cron job using the:

mvn appengine:deployCron 

It still will not work.

Use:

gcloud app deploy cron.yaml