1

So I'm using an AE managed VM to host a website with the nodejs docker image - works great - site works, etc. However, I can't seem to get a AE cron job registered. I added a cron.yaml file right next to my app.yaml file, and I'm not excluding it in my docker file.

Is there some extra step I need to take for the cron job to be registered? Or are the cron jobs not supported on managed VMs?

Cron.yaml:

cron:
- description: daily summary job
  url: /cron/socialmedia/twitter
  schedule: every 2 minutes
Christopher
  • 412
  • 3
  • 11

2 Answers2

1

At least on regular GAE (i.e. not managed VM) simply uploading the application with appcfg.py update doesn't always also update the cron jobs.

Updating cron jobs specifically, using appcfg.py update_cron should work in such cases.

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
  • Thanks, after tons of toying around it came down to having to use the appcfg.py file as you suggested (no need to do cron in the docker image). 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! – Christopher Dec 17 '15 at 01:03
0

You can deploy your cron.yaml jobs using gcloud preview app deploy cron.yaml

Sean Lynch
  • 6,267
  • 2
  • 43
  • 45