Deploying a cron definition

A cron.yaml definition file is a type of deployable and therefore can be deployed to App Engine in the same manner as a service with gcloud. To deploy a cron.yaml, simply run:

gcloud app deploy cron.yaml

Services running in the standard environment can be configured to restrict access to cron endpoints by specifying login: admin on the handler for the target URL. Additionally, an X-Appengine-Cron header will be provided for all requests from the cron service. This header will be stripped from all other requests, making it a feasible way to validate cron requests for services running in the flexible environment.

Each Google Cloud project can have exactly one cron definition file. If another definition file is uploaded, all existing scheduled tasks will be deleted. Keep this in mind if your project is shared by multiple teams.