Issue
I am trying to create cron jobs for App Engine in Google Cloud Platform. But unfortunately, whenever I try to deploy a cron job, it is also overwriting the other job. Also, they are present in different directories. Please find the CRON.yaml below
cron:
- description: "sample1"
url: /
target: sample1
schedule: everyday 08:10
timezone: Asia/Singapore
cron:
- description: "sample2"
url: /
target: sample2
schedule: everyday 08:00
timezone: Asia/Singapore
Both are different cron.yaml files. But when I deploy using
gcloud app deploy --project <<project>> cron.yaml
, it is overwriting.
Please advise.
Solution
You have 2 solutions
- Use only one file. Indeed, when you upload CRON description, it overrides all the existing. It's not possible to perform an append. Cron is a yaml list, do this
cron:
- description: "sample1"
url: /
target: sample1
schedule: everyday 08:10
timezone: Asia/Singapore
- description: "sample2"
url: /
target: sample2
schedule: everyday 08:00
timezone: Asia/Singapore
- Currently, AppEngine feature are extracted to be available for all other Google Cloud product. By the way, Memcache is became MemoryStore and Cron is became Scheduler (Endpoint is under work for being extracting). So, you can use Cloud Scheduler for performing your cron. You don't have a YAML file to define, you have to set up a new Google Cloud service by GUI or command line. Be careful, retry policies aren't available by GUI, only with CLI
Answered By - guillaume blaquiere