Kubernetes CronJob syntax: how K8s cron scheduling differs from Linux cron

Kubernetes CronJobs use the standard 5-field cron syntax with one addition: an optional timezone field (schedule: '0 0 * * *' and timezone: 'America/New_York'). The expression format is identical to Linux cron, which means every cron tutorial you already know transfers directly to K8s.

Schedule pattern
Kubernetes CronJob
kubernetes
Category
Platforms
Cloud and container scheduling

How this is calculated

Kubernetes adds three features on top of standard cron: concurrencyPolicy (Forbid, Replace, or Allow) controls what happens when a previous job is still running; successfulJobsHistoryLimit and failedJobsHistoryLimit control how many completed job pods are retained; and startingDeadlineSeconds sets a tolerance for missed schedules. The biggest operational difference is that Kubernetes CronJobs create a new Pod for every invocation, which means 288 Pods per day for an every-5-minutes job. Use a concurrencyPolicy of Forbid for jobs that must not overlap, and set history limits to avoid accumulating thousands of completed Job objects.

Verdict

Kubernetes CronJobs are the standard way to run scheduled workloads in K8s. The cron syntax is identical to Linux. The concurrency, history, and deadline policies are where you need to think differently from a traditional crontab. Always set concurrencyPolicy and history limits explicitly.

More Cron scenarios

Frequently asked questions

What is a Cron Job?
A cron job is a scheduled task that runs automatically on a Unix-like operating system (like Linux or macOS) at specific intervals. It is heavily used by developers to run background tasks like database backups, cache clearing, or sending nightly emails.
What do the 5 parts of a cron expression mean?
From left to right, the 5 fields are: Minute (0-59), Hour (0-23), Day of the Month (1-31), Month (1-12), and Day of the Week (0-6, where 0 and 7 are Sunday).
What does the asterisk (*) mean in Cron?
The asterisk acts as a wildcard, meaning 'every'. For example, if the minute field is an asterisk, the task runs every single minute. If the month field is an asterisk, the task runs every single month.
How do I run a task every 5 minutes?
To run a task every 5 minutes, use the slash operator in the minute field like this: */5 * * * *. The */5 means 'every 5th minute'.