Cron expression explainer

Type a crontab line and see it in plain English, field by field, with the next 5 runs.

How it works

  1. Type a cron expression or an @daily style shortcut
  2. Read the plain-English meaning and the field table
  3. Check the next 5 run times

What is accepted

A standard crontab line has five fields: minute (0 to 59), hour (0 to 23), day of month (1 to 31), month (1 to 12 or JAN to DEC) and day of week (0 to 7 or SUN to SAT, where 0 and 7 are both Sunday). Each field can be * for every value, a number, a list with commas, a range with a dash, or a step with a slash, as in */15 or 10-40/10 or MON-FRI. Names are not case sensitive. The shortcuts @hourly, @daily, @midnight, @weekly, @monthly, @yearly and @annually are expanded, and the page shows what they mean. A sixth field for seconds is not supported, and the page says so. Quartz extras such as ?, L, W and #, and a step on a single number such as 5/15, are rejected.

Errors name the field

If a field cannot be read, the page shows a fixed message such as Field 2 (hour) is not valid, with the allowed range, and never repeats what you typed. The rules are strict: a range must go upwards, so 5-1 and FRI-MON are refused, steps must be 1 or more, and values outside the field's range are refused. The page checks the fields in order and reports the first bad one.

Day of month and day of week

When both the day-of-month and the day-of-week field are restricted, even with a full range such as 1-31 or 0-6 (which then matches every day), cron runs the job when either one matches. 0 0 13 * FRI runs at midnight on every 13th and on every Friday, not only on Friday the 13th. When either field starts with *, as in */2 or *, both conditions must hold, so 0 0 */2 * FRI runs on Fridays that fall on odd days of the month. This is how the common Vixie-style cron works. Some other schedulers treat the two fields differently, so check your own system. The page adds a note whenever the either-or rule applies.

Next run times

The next five runs are found by stepping through the calendar from today's date, using the date and time shown by your device. Only times after the current minute are listed, so at 15:00 a job set for 09:30 shows tomorrow's run first. The page reads the clock again whenever you change a field. The search covers about eight years, enough to reach 29 February, and a schedule such as 30 February shows that no run was found. Times are written as the date and time in the local time of the machine that runs the cron, with no time zone, because the page does not know it. Daylight saving changes are not applied.

Frequently asked questions

What does */15 in the minute field mean?

Every 15 minutes starting from 0: at minutes 0, 15, 30 and 45 of every hour. */5 is every 5 minutes. The step counts from the start of the range, not from when the job was installed.

Why does my job run on days I did not expect?

If both day of month and day of week are set, cron runs when either matches. 0 0 1 * MON runs on the 1st of every month and also every Monday. To run only on Mondays that are the 1st, use a script that checks the day.

Does it support seconds or Quartz syntax?

No. Only the five standard fields and the @ shortcuts. A sixth field is refused with a message. L, W, # and ? belong to Quartz and similar schedulers and are not accepted.

Which time zone are the run times in?

The local time of the server that runs the cron. The page does not know it, so times are shown without a zone. If your cron daemon uses UTC, read them as UTC.

Is 0 and 7 both Sunday?

Yes, in the day-of-week field 0 and 7 both mean Sunday, so 5-7 is Friday, Saturday and Sunday. Names SUN to SAT work too.

What does @weekly run?

It is the same as 0 0 * * 0: midnight at the start of Sunday. @monthly is 0 0 1 * *, @yearly is 0 0 1 1 * and @daily is 0 0 * * *.