Do App Engine Managed VMs Support the AppEngine Cron System?

64 views
Skip to first unread message

Christopher Eaton

unread,
Dec 16, 2015, 7:44:40 PM12/16/15
to Google App Engine
I have a nodejs based Managed VM. It works great, deploys fine, etc. However, I can find basically zero documentation about getting AppEngine's cron to work with it. Many forum/stack overflow posts allude to it being supported, but no one knows how. 

I tried dropping a cron.yaml file into my app's directory (same location as the app.yaml file) but it doesn't seem to register when deployed.

Anyone know anything about this, is it supported or not?

*Note I'm not talking about cron within the docker image, I'm specifically asking about the AppEngine cron functionality that is grouped with Task Queues in the console.

Christopher Eaton

unread,
Dec 16, 2015, 8:02:28 PM12/16/15
to Google App Engine
Answered- Thanks folks - I want to leave this here in case someone else goes digging for an answer:

Deploying is not enough to get the cron jobs going, you have to use the appcfg.py (found in the google_appengine directory after installing the SDK) to update the cron.

Here's the exact command that pushed my cron.yaml to AppEngine:
./appcfg.py update_cron /path/to/app-root/ --no_cookies --noauth_local_webserver -A xxxx

*Where "xxx" is my cloud project id

Hope that helps anyone in the future!

Kyle Finley

unread,
Dec 16, 2015, 9:02:16 PM12/16/15
to Google App Engine
Christopher,

I'm glad you found a solutions. I believe that you can also specify your cron.yaml when deploying. At least it works with Go. E.g.

gcloud preview app deploy app.yaml cron.yaml

And I haven't tested it, but I suspect you can add the cron directive to your app.yaml file directly, without the need for a separate file:

// app.yaml
runtime: node
// ...
cron:
- description: task one
  url: /task/one
  schedule: every 1 minutes
Reply all
Reply to author
Forward
0 new messages