Skip to content
MtrXTools

Cron explainer

Explain a five-field cron expression in plain English and list its next ten runs in any time zone, with daylight saving changes called out: skipped and repeated hours, and how each run shifts. Runs in your browser.

Last updated

What it does

  • Explains a five-field cron expression in plain English: 30 2 * * 1-5 is "At 02:30, Monday through Friday". Shortcuts such as @daily and @hourly work too.
  • Lists the next ten runs in the time zone you choose, with the UTC offset of each and how far away it is.
  • Finds the daylight saving changes in the next year and says whether the schedule has a run in the hour that is skipped or repeated.
  • Warns when both day of month and day of week are set, which cron treats as either-or.
  • The page address keeps the expression and time zone, so you can share a link to the exact schedule.

The five fields

In order: minute (0-59), hour (0-23), day of month (1-31), month (1-12 or JAN-DEC) and day of week (0-7 or SUN-SAT, where 0 and 7 are both Sunday). Each takes * for every value, lists (1,15), ranges (9-17) and steps (*/15, 0-30/10).

Some schedulers (Quartz, Spring, AWS EventBridge) use six or seven fields with seconds or years first. This tool reads standard Unix cron, as used by crontab, Kubernetes CronJobs and GitHub Actions.

Daylight saving and cron

When clocks go forward, an hour of local time doesn't exist; when they go back, an hour happens twice. A job at 30 1 * * * in London is affected by both. Most cron daemons (cronie, Vixie cron) run a skipped job right after the change and a repeated one only once, but other schedulers differ.

To avoid surprises, schedule jobs outside 01:00-03:00 local time or run the scheduler in UTC. Kubernetes CronJobs and GitHub Actions schedules use UTC unless a time zone is set.

Questions

What does */5 mean?
Every fifth value of the field, starting from its lowest: */5 in the minute field runs at :00, :05, :10 and so on. 10-30/5 runs at :10, :15, :20, :25 and :30.
How do I run a job on the first Monday of the month?
Plain cron can't express it: 0 9 1-7 * 1 runs on days 1-7 and on every Monday, because day of month and day of week are combined with OR. Schedule 0 9 * * 1 and have the job exit unless the date is 7 or less.
Which time zone does my cron run in?
The time zone of the machine or service running it. Crontab uses the server's zone (or CRON_TZ where supported); Kubernetes CronJobs use spec.timeZone, otherwise UTC; GitHub Actions always uses UTC.