Kubernetes

Kubernetes CronJob Schedule Generator

Build and validate cron expressions for Kubernetes CronJob spec.schedule. K8s uses standard 5-field cron — no @reboot, no Quartz extensions.

At 02:00 AM

Valid

Next 10 executions

  1. 1Thu, Apr 9, 2026, 2:00 AM
  2. 2Fri, Apr 10, 2026, 2:00 AM
  3. 3Sat, Apr 11, 2026, 2:00 AM
  4. 4Sun, Apr 12, 2026, 2:00 AM
  5. 5Mon, Apr 13, 2026, 2:00 AM
  6. 6Tue, Apr 14, 2026, 2:00 AM
  7. 7Wed, Apr 15, 2026, 2:00 AM
  8. 8Thu, Apr 16, 2026, 2:00 AM
  9. 9Fri, Apr 17, 2026, 2:00 AM
  10. 10Sat, Apr 18, 2026, 2:00 AM
Use in Kubernetes
spec:
  schedule: "0 2 * * *"

K8s CronJob Constraints

  • Standard 5-field cron only (no 6-field Quartz, no sub-minute)
  • @reboot is not supported
  • Timezone: kube-controller-manager local TZ by default (often UTC in managed clusters — not guaranteed); spec.timeZone stable in K8s 1.27+ (no feature gate). Feature gate required on 1.24–1.26
  • CronJob controller checks every ~10 seconds — up to 10s of jitter per run
  • Set startingDeadlineSeconds to prevent job storms after downtime

CronJob Field Reference

FieldValuesSpecial chars
Minute0–59* / - ,
Hour0–23* / - ,
Day of month1–31* / - ,
Month1–12 or JAN–DEC* / - ,
Day of week0–7 (0 and 7 = Sunday) or SUN–SAT* / - ,

Common Patterns

ExpressionMeaning
0 2 * * *Every day at 2:00 AM UTC (nightly backup)
*/5 * * * *Every 5 minutes
0 9 * * 1-5Weekdays at 9:00 AM UTC
0 0 1 * *1st of every month at midnight
@dailyDaily at midnight (alias supported)

Kubernetes CronJob FAQ

Why does my Kubernetes CronJob sometimes skip a run?
A CronJob is skipped when startingDeadlineSeconds is set and the controller detects the job was not started within that window. If the controller was down for longer than the deadline, the missed run is dropped. Kubernetes also skips runs if the previous job is still running and concurrencyPolicy: Forbid is set. Check the CronJob events with kubectl describe cronjob <name> to see missed schedules.
What timezone does a Kubernetes CronJob use?
By default, Kubernetes CronJobs run in the kube-controller-manager's local timezone — this is often UTC in managed clusters (GKE, EKS, AKS), but is not guaranteed. From Kubernetes 1.27+, you can specify any IANA timezone explicitly: spec.timeZone: "America/New_York". On K8s 1.24–1.26, the CronJobTimeZone feature gate must be enabled. On older clusters, work around it by offsetting your expression manually or ensuring the controller runs in UTC.
What cron syntax does Kubernetes CronJob support?
Standard 5-field cron: minute hour day-of-month month day-of-week. Supports *, / (step), - (range), and , (list). Supports @-aliases like @daily and @hourly. Does not support @reboot or Quartz 6-field syntax.
What is <code>spec.startingDeadlineSeconds</code> and should I set it?
It defines how many seconds past the scheduled time Kubernetes will still start a missed run. If omitted, Kubernetes will catch up all missed runs when the controller restarts — potentially firing many jobs at once. Setting it to a reasonable value (e.g. 300 for 5 minutes) prevents cascade job storms after downtime. For non-idempotent jobs, always set this.
How do I prevent a Kubernetes CronJob from running if the previous instance is still running?
Set concurrencyPolicy: Forbid in your CronJob spec. Options are: Allow (default — new run starts regardless), Forbid (skip new run if previous is still active), and Replace (kill running job and start a new one). For most data-pipeline and backup jobs, Forbid is the right choice.