Developer Tools

Cron Expression Generator

Build it, or find out what it actually does.

  • Runs in your browser
  • Free, no signup

Build a schedule from controls, or paste one in and read what it does. Every explanation and run time is worked out here in the page.

ToolDuck uses standard 5-field cron syntax — minute hour day-of-month month day-of-week. Seconds, @daily-style shortcuts and Quartz extensions such as L, W and # are not supported, and an expression that uses them is refused rather than guessed at.

Every

The fastest way to the common case. For anything else, use the fields below or start from a preset.

Common schedules

The expression is parsed and the run times are calculated in this browser. Nothing is sent anywhere.

Cron expressions are five short fields that are easy to write and much harder to be sure of. `0 0 1 * 1` looks reasonable and does something most people do not expect, and a schedule that runs a job ten thousand times instead of ten is a bad way to find out.

This page works in both directions. Build one and it is explained as you go, with the next five run times calculated in your own timezone. Paste one and it is taken apart field by field, so you can see which part is responsible for what it does.

How to use this tool

  1. Start from a preset, or use "Every N minutes" for the common case, or type into the five fields directly.
  2. The explanation, the field breakdown and the next five run times update as you change anything.
  3. To check an expression someone gave you, open Explain one and paste it in.

The five fields

Minute, hour, day of the month, month, day of the week — in that order. Each field takes a number, a range (`9-17`), a list (`1,3,5`), a step (`*/15`), or a combination (`0-30/5`). The month and day-of-week fields also accept names, so `MON` and `1` mean the same thing.

The day-of-week field counts Sunday as both 0 and 7, because implementations disagree and documents inherit the disagreement. Both are accepted here and treated as the same day.

When both day fields are set, either one can match

This is the rule that catches people out. If the day-of-month field and the day-of-week field are both restricted — both real values rather than `*` — then a day matches if **either** matches. `0 0 1 * 1` does not mean "Mondays that fall on the first"; it means "the first of the month, and also every Monday".

It is Vixie cron's behaviour and the standard everyone inherits, so this page implements it rather than quietly doing the intuitive thing. The explanation says "or" out loud, and the next-run list shows it happening.

If you want "the first Monday of the month", standard five-field cron cannot express it. You need something to check the day inside the job, or a scheduler with a richer syntax.

Only standard five-field cron, and it says so

Cron has dialects. Quartz adds seconds and the `L`, `W` and `#` operators; some schedulers accept `@daily`, `@weekly` and `@reboot`; Kubernetes and some CI systems add their own extras. An expression that is valid in one and silently different in another is worse than one that is rejected.

This tool parses the standard five fields and refuses everything else with a reason. Shortcuts are refused as shortcuts rather than as invalid syntax, seconds are refused because a six-field expression would otherwise be read as the wrong five, and a step of zero or a step larger than the field range is refused because it could never run.

Frequently asked questions

What does */5 mean?

Every fifth value in that field. In the minute field it means every five minutes — minutes 0, 5, 10 and so on — which is the single most common cron expression there is.

Why does a schedule with both a day of month and a day of week run more often than I expected?

Because standard cron treats them as an either/or when both are set. "0 0 1 * 1" runs on the 1st of the month and on every Monday. Leaving one of the two as * is the usual fix.

Does this support @daily or @reboot?

No. Those are shortcuts some implementations accept and others do not, so an expression using one is not portable. The tool says so rather than accepting it and guessing.

Does it support seconds?

No — five fields only. A six-field expression is refused, because the alternative would be to read the first field as minutes and produce a schedule that is quietly wrong.

Which timezone are the next run times in?

Your device's own, because that is the only timezone cron itself has. A cron daemon runs in the timezone the machine is set to, so the run times here are what you would get on a machine set to your own clock.