Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cron support in node.js App Engine

I am trying to deploy a node.js app to App Engine with a cron job. I added the cron.yaml file to the app (as instructed here: https://cloud.google.com/appengine/docs/flexible/nodejs/scheduling-jobs-with-cron-yaml) and deployed, but the job never gets executed.

cron.yaml:

cron:
- description: test cron job
  url: /api/crontest
  schedule: every 1 mins

The endpoint exists in my app and I can hit it directly from the browser, but it never executes from the cron.

The only thing I see in the logs is an occasional cron: unrecognized service, but it does not correspond with the one minute frequency.

What am I missing? Is cron supported in the platform?

like image 416
BamaPookie Avatar asked Jul 29 '26 19:07

BamaPookie


1 Answers

According to https://cloud.google.com/appengine/docs/flexible/java/yaml-configuration-files, I needed to run gcloud preview app deploy cron.yaml to deploy the cron.

like image 53
BamaPookie Avatar answered Aug 01 '26 21:08

BamaPookie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!