Kubernetes CronJobs
Answer: A CronJob creates Jobs on a repeating schedule written in cron syntax, for tasks like backups, report generation or cleanup. Each CronJob is like one line in a crontab file.
Example
apiVersion: batch/v1
kind: CronJob
metadata: {name: hello}
spec:
schedule: "*/5 * * * *"
timeZone: "America/Los_Angeles"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: hello
image: busybox
command: ["date"]
Watch it
kubectl get cronjob hello
kubectl get jobs --watch
Caveats
Jobs should be idempotent: in some circumstances a CronJob can create more than one Job for a schedule, or skip one.
Claims
- id: C1 claim: CronJob is meant for regular scheduled actions such as backups. source: S1 evidence: "CronJob is meant for performing regular scheduled actions such as backups, report generation,"
- id: C2 claim: One CronJob is like one line of a crontab file. source: S1 evidence: "and so on. One CronJob object is like one line of a crontab (cron table)"
- id: C3 claim: A single CronJob can create multiple concurrent Jobs. source: S1 evidence: "For example, in certain circumstances, a single CronJob can create multiple concurrent Jobs."
- id: C4 claim: The hello cron job scheduled a job at the specified time. source: S2 evidence: "You should see that the cron job hello successfully scheduled a job at the time"
Sources
- [S1] CronJob. Kubernetes Authors. https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ . License: CC BY 4.0 (kubernetes/website). Accessed 2026-11-04.
- [S2] Running Automated Tasks with a CronJob. Kubernetes Authors. https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/ . License: CC BY 4.0 (kubernetes/website). Accessed 2026-11-04.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Kubernetes Authors, CronJob, CC BY 4.0 (kubernetes/website); Kubernetes Authors, Running Automated Tasks with a CronJob, CC BY 4.0 (kubernetes/website).
Cite this
iinventedlight. 2026. "Kubernetes CronJobs." iinventedlight Library, iil:note:gzpwcd73, version of 2026-11-04. https://iinventedlight.com/library/notes/kubernetes-cronjobs/. License: CC-BY-4.0.
@misc{iil_note_gzpwcd73,
author = {{iinventedlight}},
title = {{Kubernetes CronJobs}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-04},
url = {https://iinventedlight.com/library/notes/kubernetes-cronjobs/},
note = {Permanent ID iil:note:gzpwcd73. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/kubernetes-cronjobs.md.