Modern Niche World MNW

Cron Expression Explainer

Type a cron schedule, such as 30 9 * * 1-5, to see what it means in words and when it will run next, in your time zone and in UTC.

Five fields: minute, hour, day of month, month and day of week. Or a shortcut such as @daily. A whole crontab line works too; the command is ignored.

Cron uses the time zone of the machine it runs on; many servers use UTC.

Type a cron expression to see what it means.

Worked out on your device. Nothing is sent or saved.

Know when a cron job will really run

Cron runs commands on a schedule written as five short fields. A slip, such as a 0 in the wrong place, can mean a backup that runs every minute or a report that never runs. This explainer reads the schedule back in words and lists when it runs next, so you can check it before it goes live.

How to use it

  1. Type or paste the expression, or a whole line from a crontab.
  2. Read the description and the field-by-field breakdown.
  3. Choose your time zone or UTC, to match the machine the job runs on.
  4. Check the next 10 run times, then copy the description into your notes or code review.

The five fields

  • Minute 0 to 59, hour 0 to 23, day of month 1 to 31.
  • Month 1 to 12 or JAN to DEC; day of week 0 to 7 or SUN to SAT, where 0 and 7 are both Sunday.
  • * means every value, 1-5 a range, 1,15 a list and */10 every tenth value.
  • Shortcuts: @hourly, @daily, @weekly, @monthly and @yearly. @reboot runs once when cron starts, not at a time.

Examples

  • 0 4 * * * runs at 04:00 every day.
  • */10 9-17 * * 1-5 runs every 10 minutes from 09:00 to 17:50, Monday to Friday.
  • 0 0 1 */3 * runs at midnight on the first day of January, April, July and October.

Rules that catch people out

  • Both day fields set: either one is enough, unless one of them starts with *.
  • Steps restart: */7 in the minute field runs at :56 and again at :00, not every 7 minutes across the hour.
  • Missing days: a job set for the 31st skips shorter months.

What it covers

It covers standard cron as Vixie cron and cronie read it; Kubernetes CronJobs use the same five fields. Quartz and AWS EventBridge use six or seven fields with different rules, so they get a clear message instead of a guess. It doesn’t run, save or schedule anything.

Good to know

Around daylight saving changes, cron programs behave differently, so avoid scheduling important jobs between 01:00 and 03:00 local time, or run the server on UTC. To compare times across places, use the Time Zone Converter.

Frequently asked questions

What if both the day of the month and the day of the week are set?
Then a day that matches either one runs. 0 9 1 * 1 runs at 09:00 on the 1st of each month and also every Monday. One exception in the common cron programs: if either field starts with *, as in */2, both must match.
Which time zone does cron use?
The time zone of the machine it runs on, unless the crontab sets another (some cron programs accept CRON_TZ). Many servers run on UTC. Choose your time zone or UTC to see the run times either way.
Does it work for Quartz, AWS or Kubernetes schedules?
Kubernetes CronJobs use the same five fields, so they read the same here, apart from rare edge cases. Quartz and AWS EventBridge use six or seven fields, with seconds or a year, and symbols such as ? L W and #; their rules differ, so this tool says so instead of guessing.
What happens when the clocks change?
Cron programs differ. This tool lists times as the wall clock shows them: a time skipped when clocks go forward is marked as skipped, and a time repeated when clocks go back is listed twice. Some programs run a skipped job just after the change, or a repeated one only once.