Cron syntax cheat sheet
ββββββββββββββ minute (0β59)
β ββββββββββββ hour (0β23)
β β ββββββββββ day of month (1β31)
β β β ββββββββ month (1β12 or JANβDEC)
β β β β ββββββ day of week (0β7 or SUNβSAT, 0 and 7 = Sunday)
β β β β β
* * * * * command
| Symbol | Meaning | Example |
* | any value | * * * * * every minute |
, | list | 0 9,17 * * * at 09:00 and 17:00 |
- | range | 0 9 * * 1-5 weekdays at 09:00 |
/ | step | */15 * * * * every 15 minutes |
Gotchas
- Day-of-month OR day-of-week: if both fields are restricted, cron runs when either matches.
0 0 13 * 5 runs on every 13th and every Friday.
- Timezone: cron uses the server's timezone (check with
timedatectl). Kubernetes CronJobs support spec.timeZone.
- Environment: cron runs with a minimal
PATH. Use absolute paths and redirect output to a log.
- Overlap: wrap long jobs with
flock -n /tmp/job.lock so runs don't pile up.
Common schedules