I have two modules/services and each one has a cron.xml. Only one of these ever seems to run (the most recently deployed in my experience), and the other doesn\'t fail, but
Use the target: backend-module-name
parameter inside a cron job you want to send to a module other than default. Only one cron.yaml
needed.
Make sure you update: appcfg.py update app.yaml backend_module.yaml cron.yaml
The cron.yaml
is an app-level config file, not a service/module one. Meaning when you deploy the one you have in one module it'll overwrite the cron config from the other one.
So you have to create a single cron.yaml
file containing job configs for all services/modules. As @GAEfan mentioned you'll also need add target
configs for each job. You might also need to add a dispatch.yaml
file and maybe re-visit/adjust the request paths so that the cron job-issued requests make it to the right service/module.
Deploying the app-level cron.yaml
might not be happening implicitly when deploying the service(s), you may need to deploy it explicitly. From
Uploading cron jobs:
Option 2: Upload only your cron updates
To update just the cron configuration without uploading the rest of the application, run the following command:
appcfg.py update_cron <app-directory>
Some more or less related Q&As: