CronJob
The document name is the job name: lowercase letters, digits, hyphens or underscores. The app must exist live or be declared in the same files.service.jobs list of an App: catchUpLookback, cpu, memory and warnAfter.
HTTP jobs
Instead of a command, a job can call a path on the app itself. Sethttp and leave out command, mode, cpu and memory.
/. A header holds either a literal value or a secretRef naming an env var of the app, and the secret is read at run time, so no secret text lives in the file. timeout bounds the call.
Each job has one owner. Declaring the same job name in an App’s service.jobs and as a CronJob fails the plan with ownership_conflict, and so does a job that the app’s own app.yaml declares. Jobs created in the dashboard or CLI that no file lists are kept, and removed only by prune.
A command can hold a credential. Plan output hides a changed command value that looks like one, and a secret should be read from the app’s env at run time, not written into the file.
AlertRule
threshold rule needs metric, a comparator (>, <, >= or <=) and a threshold. Other types, such as crashloop or scheduled_task_failure, take only the fields that apply to them. The channel is a notification channel by name and must exist.
Invalid files
A bad document fails before anything is planned, with the file, line and a stable code.
Unknown fields fail with
schema_unknown_field. See Errors for every code.
Export
Export writes a CronJob document for each job that is not declared by the app’s ownapp.yaml, and an AlertRule document for each rule, so a repository can adopt what you built in the dashboard.