DO IT EASY APP
English

Cron expression generator and explainer

Build a cron expression from options or explain one field by field, and see its next 5 run times.

  • No sign-up, no fees.
  • Builds a cron expression from options: every N minutes, every day, certain weekdays, a day of the month.
  • Every field is explained in plain English.
  • The next 5 run times, with dates.
  • @daily and @hourly shortcuts and names like JAN, MON.
  • Shows the faulty field and value.
  • What you type is processed, but never shared with anyone.

Crontab: how to build a cron expression

If you don't want to write the expression by hand, use the Build a cron expression box at the top: pick the frequency (every N minutes, every day, certain weekdays, a day of the month, a day of the year) and type the hour and minute. The expression is written into the box below automatically and explained at once; you also see the next run times. Paste the generated line into your crontab, cloud scheduler or CI setting.

How to use the Cron Expression Explainer

Don't work out in your head when */15 9-18 * * 1-5 runs. Four steps:

  1. Type the expression. Type or paste it into the Cron expression box. You can also click one of the ready-made examples below.
  2. Look at the fields. The table explains each field separately: Minute, Hour, Day of month, Month and Day of week. Descriptions like "Every minute" and "Every hour" and the expanded form of the expression are written out.
  3. See the next runs. The Next 5 runs (your local time) list shows at which moments the expression will fire from now on.
  4. Fix errors. If you write a faulty expression, it says which value in which field is the problem.

What is a cron expression?

Cron is the scheduler that runs tasks automatically at set times on Linux and Unix servers. It's used for taking backups, sending reports, clearing caches or running a script every night. When it runs is written with a short five-field line called a cron expression; the file these lines sit in is called a crontab. Cloud services, CI systems and many applications use the same notation. Cron scheduling notation is short but hard to read; this tool turns it into an English sentence.

The five fields

A cron expression is five fields separated by spaces:

  1. Minute (0-59)
  2. Hour (0-23)
  3. Day of month (1-31)
  4. Month (1-12 or JAN-DEC)
  5. Day of week (0-6, Sunday is 0; 7 also counts as Sunday; or SUN-SAT)

In each field you can have: * (all), 5 (a single value), 1-5 (a range), 1,15 (a list), */10 (every 10th), 9-17/2 (stepped within a range).

Shortcuts

@yearly (or @annually), @monthly, @weekly, @daily (or @midnight) and @hourly are supported. The tool shows their five-field equivalents too. @reboot is an event, not a time, so it produces no schedule list.

When does cron run: common examples

Expression Meaning
0 * * * * At the top of every hour
*/15 * * * * Every 15 minutes
0 9 * * 1-5 Every weekday at 09:00
30 2 * * * Every night at 02:30
0 0 1 * * At midnight on the 1st of every month

Careful: the OR rule in the day fields

If both day of month and day of week are specified, cron runs when either one matches. 0 9 13 * 5 doesn't mean "Friday the 13th"; it runs on the 13th of every month and every Friday. This is cron's most surprising rule.

Why is a cron explainer needed?

When a crontab line is written wrong, the job either never runs or runs at unexpected times; taking a backup at noon instead of midnight, sending an email every minute. Looking at the next run times here before putting the line on the server prevents these surprises.

Common mistakes

  • Forgetting the time zone: if the server runs on UTC, there's an offset from your local time.
  • Mixing up the field order: the first field is the minute, not the hour.

To convert timestamps there's Unix timestamp converter, for time differences World clock and time difference, and for regular expressions Regex tester.

Frequently asked questions

Is this tool free?

No cost at all. Use it every minute or every hour. Not bad, right?

Is what I type sent anywhere?

The calculation happens in your browser. What you type is processed, but never shared with anyone.

Do six-field expressions with a seconds field work?

No. This tool reads the standard five fields of Linux crontab. The seconds field of Quartz and Spring, and signs like L, W and #, aren't supported.

The next run times don't match my server.

The tool calculates times in your device's time zone. If the server runs on UTC, there's an offset from your local time.

It says "Never runs". Why?

You may have given a date that doesn't exist, like 0 0 30 2 *. The tool looks 5 years ahead and tells you if it finds nothing.

How do I write "every 5 minutes"?

*/5 * * * *.

Does it produce expressions like a cron generator?

This tool explains. You can start from the examples in the table above, change the values to build your own expression and check the result instantly.

Can I use it on my phone?

Yes. Type the expression; the explanation and next runs show right away.

How are the days of the week numbered?

Sunday is 0, Monday 1 ... Saturday 6; 7 also counts as Sunday.

Related tools