BamaPookie
BamaPookie

Reputation: 2569

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?

Upvotes: 3

Views: 3072

Answers (1)

BamaPookie
BamaPookie

Reputation: 2569

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.

Upvotes: 7

Related Questions