CronJob manifest
Minimal example
Section titled “Minimal example”apiVersion: odysseus/v1kind: CronJobmetadata: name: addriva-etl-ingest labels: {app: addriva-etl-ingest, project: addriva}spec: schedule: "17 1 1 * *" # no timezone: UTC, matching the retired host crontab concurrencyPolicy: skip startingDeadlineSeconds: 300 suspend: false jobTemplate: image: registry.delta-telematics.ca/addriva/etl:0.1.0 placement: {node: vps-71623e00} networks: [addriva-internal] command: ["ingest", "--sources", "oda,geoyukon,adresses_qc", "--version", "ODA_v1_2021"] environment: ADDRIVA_S3_ENDPOINT: "http://addriva-seaweedfs:8333" ADDRIVA_S3_BUCKET: "addriva-raw" ADDRIVA_OS_HOST: "http://addriva-opensearch:9200" ADDRIVA_OS_USER: "admin" secrets: - vaultPath: deployments/addriva-etl rotation: restart resources: limits: {cpu: "2", memory: 3500Mi} requests: {cpu: 500m, memory: 1Gi} restartPolicy: "no" backoffLimit: 2 activeDeadlineSeconds: 14400 ttlAfterFinished: 4392hCronJobManifest · testdata/docs-examples/monthly-cronjob.yamlCronJob spec
Section titled “CronJob spec”Generated from CronJobSpec. Hand edits to this table are overwritten on the next build — change the Go doc comment, or the generator.
| Field | Type | Required | Default | Mutability | Since |
|---|---|---|---|---|---|
concurrencyPolicy |
string | no | — | in-place | 0.23.0 |
failedRunsHistoryLimit |
integer | no | — | in-place | 0.23.0 |
jobTemplate |
JobSpec | no | — | recreate | 0.23.0 |
schedule |
string | no | — | in-place | 0.23.0 |
startingDeadlineSeconds |
integer | no | — | in-place | 0.23.0 |
successfulRunsHistoryLimit |
integer | no | — | in-place | 0.23.0 |
suspend |
boolean | no | — | in-place | 0.23.0 |
timezone |
string | no | — | in-place | 0.23.0 |
concurrencyPolicy: ConcurrencyPolicy is what happens when a firing arrives while the previous
run is still going: skip, queue or replace.
failedRunsHistoryLimit: FailedRunsHistoryLimit is how many failed run records are kept before the
oldest are pruned. Omit it for the platform default.
jobTemplate: JobTemplate is the workload each firing runs. The cronjob owns exactly one
managed job of the same name and re-runs it, rather than creating a fresh
job per firing.
schedule: Schedule is a five-field cron expression. A TZ= or CRON_TZ= prefix inside
it is refused — timezone: is the only timezone surface — and so is a
schedule whose firings can land in a daylight-saving spring-forward gap.
startingDeadlineSeconds: StartingDeadlineSeconds is how late a firing may still be started when the
control plane was absent at the scheduled moment. 0 takes the default and
-1 means a missed firing is never caught up.
successfulRunsHistoryLimit: SuccessfulRunsHistoryLimit is how many successful run records are kept
before the oldest are pruned. Omit it for the platform default.
suspend: Suspend stops new firings without deleting the cronjob or its history.
timezone: Timezone is the IANA zone the schedule is read in, such as
“Europe/Copenhagen”. Omit it for UTC.