Format Code Now
/
Web & markupCron Expression Explainer Next: URL Parser ›

Cron Expression Explainer

WM-01

Paste a cron expression such as */15 9-17 * * 1-5 and get it in plain English, plus the next 5 times it will run in UTC. It reads 5 fields, or 6 when the first one is seconds.

Runs in your browser. Nothing is uploaded.

Cron expression

Explanation

How to use it

  1. Type or paste one cron expression into the input box.
  2. Tick Include seconds if your expression starts with a seconds field, which makes 6 fields in all.
  3. Read the sentence that describes the schedule. Untick 24-hour time to see AM and PM instead.
  4. Check the next 5 run times under it. They are in UTC, so convert them if your server uses another time zone.
  5. Use Share link to send the expression to someone else.

What the fields mean

A standard cron expression has 5 fields separated by spaces: 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). A star means every value. A comma lists values, a dash gives a range, and /5 steps through them, so 0-30/10 means minutes 0, 10, 20 and 30. Shortcuts such as @hourly, @daily and @weekly are accepted too.

The run times are in UTC

The next 5 run times are worked out in this page from the expression you typed, and they are shown in UTC, not in your local time zone. Cron on a real server runs in the time zone that server or the scheduler is set to, and some tools, such as GitHub Actions scheduled workflows, use UTC. Convert the times before you trust them for a job that must run at a local hour. Daylight saving changes are not applied, because UTC has none.

Day of month and day of week together

When you set both the day of month and the day of week, standard cron runs the job when either one matches, not both. So 0 0 13 * 5 runs at midnight on every 13th and also on every Friday, not only on Friday the 13th. If only one of the two fields is a star, both conditions must hold. Quartz and Spring style expressions with L, W and # are explained in words, but their run times are not listed here.

Error messages and what to do

MessageWhat it meansFix
Expected 5 fields (minute hour day-of-month month day-of-week) but found 4.The expression has too few or too many space-separated parts.Add the missing field. If the first field is seconds, tick Include seconds and use 6 fields.
60 is out of range in the minute field. Allowed: 0 to 59.A number is outside what that field accepts.Use 0 to 59 for minutes and seconds, 0 to 23 for hours, 1 to 31 for day of month, 1 to 12 for month and 0 to 7 for day of week.
The step in the minute field "*/0" must be at least 1.A step after a slash has to be 1 or more.Replace /0 with a real step such as /5.
Cannot read "a" in the minute field "a".A value is not a number, and is not a month or day name where those are allowed.Use numbers, or JAN to DEC and SUN to SAT in the month and day-of-week fields.
Enter one cron expression at a time.The box holds more than one line of text.Remove the extra lines, or paste each expression separately.

Questions people ask

How do I read a cron expression?

Read it left to right as minute, hour, day of month, month and day of week. For example 30 2 * * 1 means minute 30, hour 2, any day of month, any month, on Monday: every Monday at 02:30. Paste it above and the plain-English line says the same.

What does */5 mean in cron?

A star with a step means every 5th value in that field, starting at the lowest. In the minute field */5 runs at minutes 0, 5, 10 and so on up to 55. In the hour field it runs at hours 0, 5, 10, 15 and 20.

What time zone do the next run times use?

UTC. The 5 times shown are computed here from your expression and are not read from any server, so they do not know your server's time zone or daylight saving rules. Convert them to the zone your scheduler uses before relying on them.

Does cron use 5 or 6 fields?

Standard Unix cron uses 5: minute, hour, day of month, month and day of week. Some schedulers add a leading seconds field, giving 6, and Quartz can also take a year. Tick Include seconds for the 6-field form. A year field is not supported.

What happens when both day of month and day of week are set?

Standard cron runs the job on days that match either field. 0 0 1 * 1 runs on the 1st of every month and on every Monday. When one of them is a star, only the other restricts the days.

Does this support Quartz or Spring cron expressions?

Partly. Six fields with seconds and the ? wildcard work, and L, W and # are explained in words, but their run times are not listed. Day numbers follow standard cron, where 1 is Monday and Quartz uses 1 for Sunday, so use day names to be safe.

About this tool

Reads 5 fields (minute, hour, day of month, month, day of week) or 6 with a leading seconds field. It accepts lists, ranges, steps, month and day names, 0 or 7 for Sunday, and shortcuts such as @daily. Day numbers follow standard cron (1 is Monday); Quartz counts 1 as Sunday, so use day names with Quartz expressions. The next 5 run times are in UTC, not your local time zone, and are worked out here from the expression, not read from your server. When both day fields are set, a day runs if either matches, as in standard cron. Quartz style L, W and # are explained in words but their run times are not listed. A year field is not supported.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.