Cron expression generator — build a crontab schedule from menus

Pick when a job should run from a few menus and the tool writes the 5-field cron expression for you, explains it in plain English and lists the next five run times.

Live demo · real result from this tool
Step: a number like 15. At: a list like 0,30.
0–23. At: 9 or 9,17. Range: 9-17.
* for every day, or e.g. 1,15 or 1-7.
* for every month, or e.g. 1-6 or JAN,JUL.

Press Generate to create a result.

Processed on your device — nothing is uploaded.

How to use the cron generator

  1. Choose a Minute mode: every minute, every N minutes, or at fixed minutes. Type the number or list in Minute value (15, or 0,30).
  2. Choose an Hour mode: every hour, every N hours, at fixed hours (9 or 9,17), or Between hours (9-17). Enter it in Hour value.
  3. Pick Day of week: every day, Monday to Friday, Saturday and Sunday, or Specific days (0 or 7 = Sunday, 1 = Monday … 6 = Saturday).
  4. Leave Day of month and Month as *, or narrow them (1,15 or 1-6 or JAN,MAR).
  5. Choose a Time zone for the preview. The expression, its plain-English meaning and the next five runs update as you type.

What it does and when to use it

Cron syntax is short but easy to get wrong: is the hour field second or third, and is Sunday 0 or 7? This tool builds the line from choices you can read. Use it for a crontab entry, a Kubernetes CronJob schedule or a GitHub Actions on.schedule; all take the same 5-field format.

To go the other way and read an expression someone else wrote, use the Cron Parser. To type each field by hand and see it explained, use Crontab Guru.

How it works

The menus map to the five fields of a POSIX crontab line, in this order:

minute  hour  day-of-month  month  day-of-week

“Every” writes *, “Every N” writes */N, and fixed values or ranges are copied as typed. Monday to Friday becomes 1-5, the weekend 0,6. The line is then checked with the cron-parser library, described with cronstrue and stepped forward from now to list five runs, all in your browser.

Worked examples

Weekday morning report. Minute “At minute(s)” 30, Hour “At hour(s)” 9, Day of week “Monday to Friday”:

30 9 * * 1-5
Schedule: At 09:30, Monday through Friday

Polling during office hours. Minute “Every N minutes” 15, Hour “Between hours” 9-17, every day:

*/15 9-17 * * *
Schedule: Every 15 minutes, between 09:00 and 17:59
Runs in the next 24 hours: 36

The first-Monday trap. Minute 0, Hour 3, Specific days 1, Day of month 1-7 gives 0 3 1-7 * 1. The tool warns that the job runs when either field matches, so it fires on the 1st to 7th and on every Monday. A common fix is 0 3 1-7 * * plus a weekday test inside the script.

Limits and tips

  • The Minute value, Hour value, Day of month and Month boxes are passed through as typed. Out-of-range values such as minute 75 show an “Invalid cron expression” message instead of a schedule.
  • The preview library also accepts extras like L (last day of the month) in Day of month. Classic Vixie cron and many hosted schedulers do not, so check your platform’s docs.
  • A job that must run at an exact UTC instant is safest with a UTC server clock; compare zones in Timezone Dev.

Frequently asked questions

Does the time zone setting change the cron expression?
No. The expression is the same in every zone. The Time zone menu only changes how the next run times are shown. Your server runs the job in its own time zone, so check what that is before you copy the line.
Why does "Between hours" 9-17 still run at 17:45?
An hour range includes every minute pattern inside the last hour. With */15 in the minute field, 9-17 fires at 17:00, 17:15, 17:30 and 17:45. Use 9-16 if the last run should be 16:45.
Can it make 6-field expressions with seconds?
No. The generator always writes the classic 5 fields. If your scheduler (Quartz, Spring, node-cron) wants seconds first, add them in front by hand, or paste the 6-field line into the Cron Parser to check it.
What does a warning about day-of-month and day-of-week mean?
Cron treats those two fields as OR when both are restricted. 0 3 1-7 * 1 runs on days 1 to 7 and on every Monday, not only on the first Monday.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close