Toolstia / Cron expression explainer

Cron expression explainer

Type a cron expression such as `0 9 * * 1-5` and see what it means in plain English, plus the next five times it will run in your time zone. Mistakes are explained.

Fields: minute (0-59), hour (0-23), day of month (1-31), month (1-12 or JAN-DEC), day of week (0-6 or SUN-SAT, with 0 and 7 both Sunday).

How it works

  1. Type a cron expression or tap a preset.
  2. Read the plain English description.
  3. Check the next run times.

The five fields

From left to right: minute, hour, day of month, month and day of week. A star means every value, 1-5 is a range, 1,15 is a list, and */10 means every tenth value.

Day of month and day of week

When you set both fields to something other than a star, standard cron runs the job when either one matches. So `0 12 13 * 5` runs at noon on the 13th of every month and also on every Friday.

Time zone

The next runs are shown in the time zone of your device. A server running cron may use a different time zone, usually UTC, so check which one yours uses.

Variations between systems

This follows the common five-field cron used on Linux. Some systems add a seconds field or special words like @daily, and these are not covered here.

Questions

What does */5 mean?

Every fifth value of that field, such as every 5 minutes when used in the minute field.

Is 0 and 7 both Sunday?

Yes, in the day-of-week field.

Why does it say it never runs?

The date may not exist, for example the 31st of February.

Can I use month and day names?

Yes, such as JAN and MON-FRI.