Convert Kubernetes cron to crontab
Kubernetes writes min hour dom mon dow; crontab writes min hour dom mon dow. Paste an expression to convert it. Anything that does not map exactly is flagged with the reason and a workaround.
To · crontabExactRuns in the system time zone; cronie also reads CRON_TZ=.
0 9 * * 1-5Same schedule on other platforms
GitHub ActionsExact
0 9 * * 1-5AWS EventBridgeExact
cron(0 9 ? * 2-6 *)SpringExact
0 0 9 * * 1-5QuartzExact
0 0 9 ? * 2-6Next 10 runs
computed in your browser- Calculating…
Kubernetes vs crontab
| Kubernetes | crontab | |
|---|---|---|
| Fields | min hour dom mon dow | min hour dom mon dow |
| Sunday | 0 (7 is an error) | 0 or 7 |
| Day and weekday both set | either matches; only * or ? leaves a field open | either matches; both must if one starts with * |
| Special characters | none | none |
| Shortcuts | @yearly @monthly @weekly @daily @hourly | @reboot @yearly @monthly @weekly @daily @hourly |
| Time zone | spec.timeZone, else the controller’s zone | system zone; CRON_TZ= in cronie |
| Shortest interval | 1 minute | 1 minute |
Common schedules, converted
| Kubernetes | crontab | |
|---|---|---|
| Every 5 minutes | */5 * * * * | */5 * * * * |
| Every hour | 0 * * * * | 0 * * * * |
| Every minute | * * * * * | * * * * * |
| Every 10 minutes | */10 * * * * | */10 * * * * |
| Every 15 minutes | */15 * * * * | */15 * * * * |
| Every 30 minutes | */30 * * * * | */30 * * * * |
| Daily at midnight | 0 0 * * * | 0 0 * * * |
| Daily at 9 am | 0 9 * * * | 0 9 * * * |
| Weekdays at 9 am | 0 9 * * 1-5 | 0 9 * * 1-5 |
| Every Monday | 0 0 * * 1 | 0 0 * * 1 |
| First day of the month | 0 0 1 * * | 0 0 1 * * |
| Every 6 hours | 0 */6 * * * | 0 */6 * * * |
| Every Sunday at midnight | 0 0 * * 0 | 0 0 * * 0 |
| Every 2 hours | 0 */2 * * * | 0 */2 * * * |
| Every 12 hours | 0 */12 * * * | 0 */12 * * * |
| Daily at noon | 0 12 * * * | 0 12 * * * |
| Every Friday | 0 0 * * 5 | 0 0 * * 5 |
| Every quarter | 0 0 1 */3 * | 0 0 1 */3 * |
| Every 2 minutes | */2 * * * * | */2 * * * * |
| Every 3 hours | 0 */3 * * * | 0 */3 * * * |
| Daily at 6 am | 0 6 * * * | 0 6 * * * |
| Daily at 6 pm | 0 18 * * * | 0 18 * * * |
| Twice a day | 0 */12 * * * | 0 */12 * * * |
| Weekdays at 6 pm | 0 18 * * 1-5 | 0 18 * * 1-5 |
| Weekends at 10 am | 0 10 * * 0,6 | 0 10 * * 0,6 |
| 15th of the month | 0 0 15 * * | 0 0 15 * * |
| Once a year | 0 0 1 1 * | 0 0 1 1 * |
| Every 3 minutes | */3 * * * * | */3 * * * * |
| Every 20 minutes | */20 * * * * | */20 * * * * |
| Every 4 hours | 0 */4 * * * | 0 */4 * * * |
| Every 8 hours | 0 */8 * * * | 0 */8 * * * |
| Daily at 1 am | 0 1 * * * | 0 1 * * * |
| Daily at 2 am | 0 2 * * * | 0 2 * * * |
| Daily at 3 am | 0 3 * * * | 0 3 * * * |
| Daily at 8 am | 0 8 * * * | 0 8 * * * |
| Every weekday | 0 0 * * 1-5 | 0 0 * * 1-5 |
| Every weekend day | 0 0 * * 0,6 | 0 0 * * 0,6 |
| Every Tuesday | 0 0 * * 2 | 0 0 * * 2 |
| Every Wednesday | 0 0 * * 3 | 0 0 * * 3 |
| Every Thursday | 0 0 * * 4 | 0 0 * * 4 |
| Every Saturday | 0 0 * * 6 | 0 0 * * 6 |
| Every 6 months | 0 0 1 */6 * | 0 0 1 */6 * |
FAQ
Can every Kubernetes expression be converted to crontab?
Of the 42 common schedules on this page, all convert exactly. Special characters that crontab lacks are still flagged when you use them.
How is Sunday written in Kubernetes and crontab?
Kubernetes: 0 (7 is an error). crontab: 0 or 7.
Does the time zone carry over?
The expression has no time zone. Kubernetes: spec.timeZone, else the controller’s zone. crontab: system zone; CRON_TZ= in cronie.