How to read a cron expression without guessing
The five cron fields in order, why Sunday can be 0 or 7, and how to turn 0 9 * * 1-5 into “9:00 on weekdays.”
The five fields, left to right
A standard Unix cron expression has five fields: minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–7, where both 0 and 7 are Sunday). `0 9 * * 1-5` is “at minute 0, hour 9, every calendar day, every month, Monday through Friday.”
Stars mean “every.” Commas list values (`1,15`), hyphens are ranges (`1-5`), and a slash is a step (`*/15` means every 15 units). Those four tokens cover almost every crontab you will inherit.
The traps that cause 3 a.m. pages
Day-of-month and day-of-week together are the classic foot-gun: some cron implementations run the job if either matches, not both. Timezone is the other: cron has no timezone field, so “hour 9” is whatever the host thinks local time is — including daylight-saving shifts.
If you see six or seven fields, you are looking at Quartz or systemd syntax, not classic cron. Translating those with a 5-field parser will be wrong. Check the docs for the scheduler you actually run.
Try related tools
- Cron parser — Translate a 5-field cron expression into plain English.