DevOps

Cron explainer

Paste a cron line to read it as a sentence and see its next five runs.

Runs in your browserNothing you paste is sent anywhere

Five fields: minute, hour, day of month, month, day of week. @daily and friends work too.

0 of 256 characters

Type a cron line to start.

Or press Try an example and I'll fill it in for you.

What it does

It reads a standard five-field cron line, the kind you find in a crontab, and tells you in one plain sentence when it runs. Then it goes field by field, so you can see which part means what, and lists the next five runs in UTC and in your own time zone. Pick the zone your server runs cron in and the runs follow it, daylight saving changes included. It knows lists, ranges, steps, month and day names, Sunday as 0 or 7, and the macros such as @daily and @hourly. It also knows the old Vixie cron rule that trips everyone up at least once: when both day fields are set, the job runs on any day that matches either one, not only on days that match both.

How to use it

Type or paste a cron line into the box, or press Try an example. The sentence and the runs update as you type. If your server is not on UTC, pick its zone from the list; your own zone sits near the top. If something is wrong, I tell you which field and which part, and how to fix it. @reboot gets an honest answer: it is not a schedule at all, it runs once each time cron starts.

How I built it

The parser is my own, in plain TypeScript, and it reads a line the way Vixie cron and cronie do, quirks included: a field that starts with *, like */2, counts as unrestricted for the day rule. The next runs walk the calendar one day at a time and turn each matching clock time into a moment in UTC with the time zone data your browser already has, through Intl.DateTimeFormat. When the clocks go forward, a job set for a skipped time runs at the jump; when they go back, it runs once, just as cron does. The tests pin the clock and check a daylight saving change in New York, month ends, 29 February and the year 2100, which is not a leap year. Nothing you type leaves the page.