Free Online Cron Expression Generator with Next Run Times
Pick a preset or set each field yourself, with every, a list, a range or a step for all five, and a sixth seconds field for the schedulers that use one. The expression, the plain English sentence and the next run times appear as you go, with the crontab line ready to paste.
* * * * *
every minute (UTC)
Next runs, in UTC
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
The Two Day Fields Are an OR, Not an AND
This is the single most common cron mistake, and it is not obvious from the syntax.
Cron has two ways of saying which day: day of the month, and day of the week. When only one of them is restricted, everything behaves as you expect. When both are restricted, the job runs on days that match either of them, not on days that match both.
| Expression | When it really runs |
|---|---|
0 0 13 * * |
Midnight on the 13th of every month. Only the day of month is restricted, so there is no surprise here. |
0 0 * * 5 |
Midnight every Friday. Only the day of week is restricted. |
0 0 13 * 5 |
Midnight on the 13th or any Friday, which is roughly five times a month. People write this meaning Friday the 13th and get a job that runs far more often than they planned. |
0 0 1 * 1 |
Midnight on the 1st or every Monday. Written to mean "the first Monday", it fires five or six times a month instead of once. |
Plain cron cannot express "the first Monday of the month". The usual answer is to run the job
every Monday and let the script itself check the date, or to use 0 0 1-7 * 1,
which under the OR rule still fires on the 1st to 7th as well as on every Monday. This page
warns as soon as both day fields are restricted, and the next run times underneath show you
what you have actually asked for.
The @ Macros
Shorter to read, and supported by vixie cron and by most modern schedulers.
| Macro | Equivalent | Meaning |
|---|---|---|
@yearly or @annually | 0 0 1 1 * | Midnight on 1 January. |
@monthly | 0 0 1 * * | Midnight on the first of every month. |
@weekly | 0 0 * * 0 | Midnight on Sunday. |
@daily or @midnight | 0 0 * * * | Midnight every day. |
@hourly | 0 * * * * | The top of every hour. |
Where the expression you have built matches one of these exactly, the output includes the
macro as an alternative line. There is one more, @reboot, which runs once when
the machine starts. It has no equivalent in the five fields, so this page does not offer it,
and it is worth knowing that many container images never run it at all.
How to Build a Cron Expression
A few steps, and nothing is uploaded.
What to Know About Cron
Including the two day fields, which catch everybody once.
0 0 13 * 5 is not Friday the 13th, it is the 13th or any Friday. The page raises a warning the moment you restrict both, and the next run times show you what it really means. If only one of the two day fields is restricted, the OR rule does not apply and the schedule behaves exactly as it reads.
L for last day of the month, no W for nearest weekday, no 5#2 for the second Friday, and no ?: those are Quartz and Jenkins extensions that standard crontab rejects. It also does not install anything, does not test whether your cron daemon is running, and does not check that your command exists.
Key Features & Capabilities
What this tool does, and what it deliberately does not.
About the Cron Expression Generator
There is already a cron parser on this site, which takes an expression and tells you what it means. This page is the other direction: you say what you want in controls, and it writes the expression. The two together cover the whole job, because in practice you write a schedule once and then read it back every time something has gone wrong at three in the morning.
The arithmetic is deliberately shared with the parser. The same code that reads an expression into sets of matching numbers is used here to work out the next run times and the English sentence, so the generator cannot drift away from the parser and start describing a schedule differently. That also means the awkward parts are handled properly: the two day fields combine with OR rather than AND, day of week accepts both 0 and 7 for Sunday, and month and weekday names are understood.
The warnings matter more than the controls. A cron expression is easy to write and hard to check, and the failure mode is silent: the job simply runs at the wrong time, or never. So the page shows real timestamps rather than a promise, tells you when both day fields are restricted, says when a combination such as 30 February can never come round, and is honest that the times are in UTC while your server may not be.
Frequently Asked Questions
Timezones, the OR rule, seconds, macros and the extensions this leaves out.
date on the server, and if the exact local hour matters, either set the job an hour earlier in summer or schedule it in UTC and let the script decide whether to do the work.* * * * * is every minute of every hour of every day. The common mistake is leaving the minute field as an asterisk while setting the hour, as in * 2 * * *, which runs sixty times between 02:00 and 02:59 rather than once. Set the minute to a number.*/5 * * * *. That fires at minute 0, 5, 10 and so on. Be aware that a step divides the whole field from its start, so */40 in the minute field fires at 0 and 40 and then waits twenty minutes, because the hour rolls over rather than continuing the count. For intervals that do not divide into 60, a list such as 0,20,40 is clearer.sleep 30 && in front of the command, or a long running process with its own timer. The sixth field on this page exists because Quartz, Spring and several libraries do support seconds, and it is labelled that way rather than pretending crontab will take it.