Cron Expression Parser
Paste a cron line and find out what it really means — including the one rule about days that surprises almost everybody the first time it costs them a night's sleep.
The five fields
In order: minute, hour, day of the month, month, day of the
week. So 30 5 * * 1-5 is half past five in the
morning, Monday to Friday.
Each field takes a number, a list (1,15), a range
(9-17), a step (*/15, meaning every
fifteenth), or * for every value. Months and weekdays
also take names: JAN, MON. Sunday is
0, and also 7, which exists because
different systems disagreed and both had to keep working.
The rule that catches everyone
If you restrict both the day of the month and the day of the week, cron runs when either one matches — not both.
0 0 13 * 5 does not mean “Friday the
13th”. It means every 13th of the month, and also every
Friday — which is roughly sixty-five runs a year instead
of the one or two you had in mind. Press the trap above and
read the next five dates; they will not all be Fridays.
It is not a bug, it is written down in the manual, and it still catches people with twenty years of experience. If you genuinely need Friday the 13th, you schedule every 13th and check the weekday inside your own script.
Which clock does it use?
The machine's, not yours. A cron line on a server set to UTC runs at those times in UTC, and the times below are shown in your zone only so you have something to compare against. This is worth checking before you decide a job did not run.
Daylight saving makes it stranger still. On the morning the clocks go forward, a job scheduled inside the hour that never happens may not run at all; when they go back, an hour repeats and a job can run twice. Anything that must happen exactly once is safer scheduled outside that window — or written so that running twice does no harm, which is the better habit anyway.
The shortcuts
@yearly, @monthly, @weekly,
@daily and @hourly all work and are
expanded here so you can see what they really are. They are easier
to read than the equivalent five fields and mean exactly the same
thing.
Frequently asked questions
Why does my job run on days I did not ask for?
Almost certainly because you restricted both the day of the month and the day of the week. When both are set, cron runs if either matches, not if both do. Set one of them back to * and the surprise stops.
What time zone are the next runs in?
Yours, as your browser reports it, purely so the dates mean something to you. The actual job runs in whatever zone the server is set to, which is very often UTC and is the first thing to check when a job seems to run at the wrong time.
Is Sunday 0 or 7?
Both. Different implementations disagreed long ago and the answer was to accept either, so 0 and 7 both mean Sunday. Saturday is always 6.
Does it support seconds?
No, and standard cron does not either. Six-field expressions with seconds at the front belong to particular schedulers - Quartz, some libraries - and are not what a Unix crontab reads.
Can I check whether my expression is valid without running it?
That is what this page is for. If it cannot be parsed you get a message saying which field is wrong, and if it can, the next five dates tell you far more than the expression does.
Is my text sent anywhere?
No. Everything happens in JavaScript inside your own browser. Nothing is uploaded and nothing is saved - close the tab and it is gone.