Cron Expression Generator

Pick how often a job should run and this cron expression generator writes the five-field line for crontab, explains it in plain English, and lists the next five run times.

Built in your browser. Nothing is sent to a server.

Quick start

1How often

2Details

On these days
to o'clock, the last hour included
0-59 , - * /
0-23
1-31
1-12 or JAN-DEC
0-6 or SUN-SAT, Sunday is 0
Have an expression already? Read it with the Cron Expression Parser.

How to use the Cron Expression Generator

  1. Choose how often the job runs under Run.
  2. Fill in the fields that appear: the interval, the hours it may run between, the time of day, the days of the week, or the day of the month.
  3. Read the description and the next five runs to confirm it does what you meant.
  4. Press Copy expression and paste it in front of your command in crontab -e.

Need something the picker cannot express, such as two separate hour ranges? Switch to Custom fields. It starts from the schedule you just built, so you only change what differs.

How it works

A cron line has five fields: minute, hour, day of month, month, and day of week. Each choice in the picker fills them in a fixed way:

  • Every N minutes becomes */N in the minute field. The hour window becomes a range such as 9-17.
  • Every N hours becomes */N, or 8-20/3 when the hours are limited.
  • Days of the week are written as numbers from 0 (Sunday) to 6 (Saturday). Three or more days in a row are joined into a range, so Monday to Friday is 1-5.

The finished line goes through the same parser as the Cron Expression Parser, which writes the description and works out the next runs in your time zone.

Examples

ChoiceExpression
Every 15 minutes from 09:00 to 17:59, Monday to Friday*/15 9-17 * * 1-5
Every 2 hours, at minute 3030 */2 * * *
Daily at 06:055 6 * * *
Weekly on Saturday and Sunday at 10:000 10 * * 0,6
Monthly on the 15th at 03:000 3 15 * *
Yearly on 25 December at midnight0 0 25 12 *

The first row is the default on this page. The hour field 9-17 covers the whole 17:00 hour, so the last run of the day is at 17:45.

Limitations

  • The output is standard five-field cron, as Linux crontab, Kubernetes CronJobs, and GitHub Actions use it. Quartz and Spring add a seconds field and do not read it as is.
  • Intervals restart every hour or day. With every 7 minutes the job runs at :56 and then at :00, four minutes later.
  • A monthly job on the 31st skips the months that have no 31st. Cron has no "last day of the month" in its standard syntax.
  • Run times are shown in your browser's time zone. The server running cron uses its own, often UTC.

Frequently asked questions

How do I run a cron job every 5 minutes?

Use */5 * * * *. Pick Every N minutes, enter 5, and set the hour window to 0 and 23 with every day ticked.

What does */15 mean?

Every 15th value from the start of the field. In the minute field that is minutes 0, 15, 30, and 45 of each hour.

Is Sunday 0 or 7?

Both work in most cron versions. This generator writes 0, which every version accepts.

Why does my job run at a different hour than I expected?

The machine that runs cron uses its own time zone. Check it with date on that server, and convert the hour if it is set to UTC.

Often used together with Cron Expression Generator.