Cron expression generator
Five fields, endless off-by-one grief, or: pick from dropdowns, read the plain-English translation, and check the next five runs before the server does.
Guide
How to use it
- Build with the dropdowns, minute, hour, day, month, weekday, or type an expression directly into the field, both stay in sync.
- Read the English line: if it does not say what you meant, the expression does not do what you meant.
- Check the next five runs, they are computed against the real calendar in your local time, the definitive test.
- Copy, and paste into crontab, your CI config or scheduler of choice.
Examples
Expressions worth recognising on sight
Daily at 03:00, the backup classic: after the day’s traffic, before the early birds, and (in the UK) occasionally running twice or not at all on clock-change nights, schedulers vary, 03:00 dodges most of it.
Every five minutes: the health-check and queue-poll workhorse. Note it fires at :00, :05, :10…, aligned to the hour, not five minutes after whenever you saved the crontab.
Weekday mornings at nine, reports and reminders. The 1-5 range is Monday to Friday, cron counts Sunday as 0 (and tolerates 7).
Method
How it works
The parser implements standard five-field cron: values, ranges, lists and steps per field, with the quirk every admin eventually learns the hard way, when both day-of-month and day-of-week are restricted, classic cron runs on EITHER match, not both. The English line calls that out whenever it applies.
Next-run times walk the real calendar minute by minute in your local time, so month lengths and the day-of-week OR rule are honoured exactly. One deliberate omission: seconds fields and @daily shortcuts are platform extensions, this page speaks the portable dialect.
FAQ
Frequently asked questions
What order are the five fields?
Minute, hour, day-of-month, month, day-of-week. The mnemonic that sticks: the units get bigger as you go, until the weekday tacked on the end.
Why did my 1st-of-month job also run on Mondays?
The OR rule: restricting both day fields makes cron fire on either. Keep one of the two day fields as * unless you truly want the union.
Is Sunday 0 or 7?
Both work in practice, this tool normalises 7 to 0. Ranges spanning the weekend (6,0) are safer written as a list than as 6-7.
What time zone do cron jobs run in?
The server’s, which is the eternal gotcha. The next-run preview here uses your local clock, translate deliberately if the server lives in UTC (many do, wisely).
What happens if the server is off at run time?
Plain cron skips silently, no catch-up. If missed runs matter, anacron or your scheduler’s catch-up mode exists for exactly that.
Does this cover Quartz and GitHub Actions syntax?
GitHub Actions uses exactly this five-field dialect. Quartz adds a seconds field and ? symbols, paste Quartz here minus its first field and the logic reads the same.
More tools