Dev tools

Cron parser / builder

Explain a 5-field cron expression in plain English and list its next upcoming run times. Standard fields with *, lists, ranges and steps; no @-shorthands, seconds field, or timezone handling. Runs on your device.

Runs on your device. The file is never uploaded.

Cron parser / builder explains a five-field cron expression in words and lists its next run times, five by default. Fields take *, lists, ranges and steps, and with both day fields restricted either one matching is enough. Matching uses your device clock while the run times print as UTC ISO strings, so the two read hours apart.

Options

Questions

Which cron dialect does it accept?

Standard five-field cron: minute, hour, day-of-month, month, day-of-week, separated by spaces. Fields take *, comma lists, dash ranges and slash steps, so */15 9-17 * * 1-5 is valid. There is no seconds field, no @daily style shorthand, and no L, W or # extensions. Anything other than five fields is refused, and the error says how many it found.

Can I use names like MON or JAN?

No, numbers only. Day-of-week runs 0 to 6 with 0 as Sunday, and month runs 1 to 12. A name fails with a message quoting the bad field value. The plain-English explanation does use names, so a month of 3 reads back as Mar and a weekday of 1 as Mon, but that is output only.

How does it treat day-of-month and day-of-week together?

With the POSIX rule: when both fields are restricted, a run happens if either one matches, not both. So 0 0 13 * 5 fires on the 13th and on every Friday. When only one of the two is restricted, that one is simply applied. The explanation states the OR case out loud so it cannot surprise you.

Which time zone are the next run times in?

Matching is done against your device local time, while the run times are printed as ISO strings, which are UTC. So the hours and minutes are matched locally and displayed shifted. There is no time zone option. A server in another zone will fire the same expression at different wall-clock moments.

How many upcoming runs can it list?

Between 1 and 100, set by count, which defaults to 5. It steps forward one minute at a time from the next minute over a horizon of about four years. If nothing matches in that window, as with the impossible 0 0 30 2 *, it stops and says no matching run time was found within a 4-year horizon.

Why is my field out of range?

Each field has its own bounds: minute 0-59, hour 0-23, day-of-month 1-31, month 1-12, weekday 0-6. A value outside them is refused with the range and the offending part quoted back. Note that 7 is not accepted as Sunday here, and a range whose upper end exceeds the maximum fails the same way.

Related Dev tools