tallge

Tools / Cron explainer

Cron expression explainer and next run times

Standard five-field cron as read by Vixie cron and its descendants, including cronie: minute, hour, day of month, month, day of week.

Show times in

Next runs

    Fields

    Examples:

    How it reads the fields

    Each field accepts *, single values, ranges a-b, steps */n and a-b/n, and comma lists of these. Month and weekday names (JAN, MON) work in any case, and both 0 and 7 mean Sunday. The shortcuts @hourly, @daily, @weekly, @monthly and @yearly expand to their five-field form.

    Pitfalls

    When both day fields are restricted, a day matches if either matches. 0 0 13 * FRI runs on every 13th and on every Friday, not only on Friday the 13th. The tool says so when it happens.

    Cron runs in the time zone of the cron daemon, which is often UTC. Next runs in local time follow cronie and Vixie cron around daylight saving changes of less than three hours. When the clock jumps forward, a job with a fixed minute and hour that falls in the skipped hour runs right after the change, and a job with * in the minute or hour field skips that hour. When the clock goes back, fixed-time jobs do not run a second time and * jobs run again in the repeated hour. Such runs are marked in the list. Other schedulers, including systemd timers, handle these nights differently.

    A step needs * or a range before it: */10 or 5-59/10. Vixie cron and cronie reject 5/10, so this tool does too, although Quartz and some libraries accept it.

    A sixth field is an error here. Quartz and some CI systems put seconds first, and some tools add a year at the end; neither is standard cron.