Kubernetes CronJob Schedule Builder

5-field robfig/cron v3 validator · IANA spec.timeZone & batch/v1 YAML generator

UTC + Local
Valid
5 fields (UTC by default, or set spec.timeZone in K8s 1.27+). Supports @hourly, @daily, @weekly.
Presets:
Interactive Field Editors (Live Sync)
Next 10 Execution Runs (UTC & Local)
#UTC TimeLocal TimeIn
Cross-Dialect Translator (1-Click Copy) Auto-converts DOW & ?
Valid expression
10 runs simulatedCmd/Ctrl+Enter
Advertisement
Reserved fixed-height slot (CLS = 0.00) 728×90 320×100 300×50

Production Best Practices for Kubernetes batch/v1 CronJobs

Kubernetes CronJobs evaluate a standard 5-field schedule inside kube-controller-manager. Prior to Kubernetes 1.27, all schedules ran in the controller-manager’s local timezone; modern clusters support spec.timeZone with IANA identifiers, though setting UTC avoids spring-forward skipped runs and fall-back duplicate triggers.

Always pair your cron schedule with explicit concurrencyPolicy (Forbid or Replace for non-idempotent jobs), successfulJobsHistoryLimit, and failedJobsHistoryLimit so high-frequency schedules like */5 * * * * do not exhaust cluster Pod or etcd quotas.

  • Parser EngineKubernetes uses standard 5-field POSIX cron (robfig/cron) plus predefined macros: @yearly, @monthly, @weekly, @daily, @hourly.
  • IANA Timezone (K8s 1.27+)Set spec.timeZone: "America/New_York" or "UTC" (always prefer UTC to prevent DST skip/double-run anomalies).
  • Missed-Run GuardIf startingDeadlineSeconds is omitted and more than 100 schedules are missed, the CronJob controller stops scheduling the job.
Does Kubernetes CronJob support 6-field seconds or AWS ? syntax?

No. Kubernetes strictly enforces 5-field POSIX schedules (or @daily/@hourly macros). Passing 6 fields or ? causes kube-apiserver to reject the CronJob manifest.

What happens if a Kubernetes CronJob takes longer than its schedule interval?

With the default concurrencyPolicy: Allow, overlapping Jobs spawn simultaneously. Set concurrencyPolicy: Forbid to skip the next run until the active Pod finishes, or Replace to terminate the slow Pod.