With cron jobs, you can schedule tasks that run at a defined time or regular intervals. The use case for cron jobs includes administration tasks that need to reoccur; for example, you need to send out an email every day that includes a report about the environment.
For each language, the cron jobs are configured a little bit differently. See the Further reading section to see detailed configuration for various languages. The cron jobs are defined in YAML format and placed in the cron.yaml file.
The following is a YAML file that will run the task every 24 hours:
- The actual task is to run it using the handler defined under the url parameter:
cron:
- description: "daily summary job"
url: /tasks/summary
target: beta
schedule: every 24 hours
- To deploy the cron job, use the following command:
gcloud app deploy cron.yaml
- Once deployed, the jobs are visible...