Cron Expression Parser

Format: minute hour day-of-month month day-of-week

You inherit a crontab and it is full of 0 */2 * * 1-5, 15 4 1 * *, */30 8-18 * * *. This parser takes a standard 5-field cron expression and returns a plain-English description (“every 2 hours on weekdays”) plus the next 5 times it will actually fire. Useful for understanding legacy schedules and verifying a new one before deploying it.

How to parse a cron expression

  1. 1

    Paste the expression

    A standard 5-field expression (`* * * * *`): minute, hour, day-of-month, month and day-of-week.

  2. 2

    Read the English description

    The parser rewrites each field in plain English, for example "At minute 0, every 2 hours, on day(s) of week 1-5."

  3. 3

    Check the next-run preview

    5 upcoming fire times. If they do not match your intent, refine the expression.

  4. 4

    Fix invalid fields

    Expressions with the wrong number of fields or out-of-range values are rejected with an error that names the offending field.

Decoding each field

Each field has its own valid range and special characters:

Field Range Wildcards supported
Minute 0-59 * , - /
Hour 0-23 * , - /
Day of month 1-31 * , - /
Month 1-12 * , - /
Day of week 0-7 * , - /
  • * = every value (* in the minute field means every minute).
  • 1,5,10 = a list of values.
  • 1-5 = a range of values.
  • */15 or 0-45/15 = a step, counted from the start of the field range.
  • Day-of-week 0 and 7 both mean Sunday, so either convention is accepted. Month and day-of-week names such as JAN or MON are not accepted; use numbers.

Examples decoded

Expression In English
0 */2 * * 1-5 At minute 0 every 2 hours, Monday through Friday
15 4 1 * * At 04:15 on the 1st day of every month
*/30 8-18 * * * Every 30 minutes between 08:00 and 18:59
0 0 1,15 * * At midnight on the 1st and 15th of every month
0 22 * * 0 At 22:00 every Sunday

What the parser accepts

  • Exactly 5 fields: minute, hour, day-of-month, month and day-of-week. Six- or seven-field Quartz expressions (with seconds or a year) are rejected.
  • Valid ranges: each value must fit its field, for example minute 0-59, hour 0-23, day-of-month 1-31, month 1-12 and day-of-week 0-7.
  • Positive steps: the value after / must be a positive number (*/0 is rejected).
  • No named shortcuts: @daily, @reboot and similar shortcuts are not accepted. Expand them to their 5-field form first (for example @daily = 0 0 * * *).

Day-of-month and day-of-week combined

When both the day-of-month and the day-of-week are set, this parser schedules a run only when both match, so 0 0 1 * MON fires only when the 1st is a Monday. Most Linux cron implementations instead treat the two fields as OR (the job runs when either matches), so double-check the expression against the scheduler you actually use.

Timezone note

The preview times are computed from the server clock, which runs in UTC. If your crontab runs on a machine with a different timezone, the times shown here can differ from the times on that machine.

Frequently Asked Questions

No. Only standard 5-field expressions are accepted. Quartz expressions with seconds (6 fields) or with a year (7 fields) are rejected with an error.

Usually one of: the preview uses the server clock in UTC while your crontab runs in a different timezone, both day-of-month and day-of-week are set (this parser requires both to match), or a step value that resets at the start of each hour or day.

Yes, if it is a standard 5-field expression, which is what Kubernetes uses (UTC by default). Keep in mind the preview here uses the server clock in UTC, so if the cluster runs in a different timezone the times can differ.

Linux cron accepts named shortcuts: @reboot (at startup), @yearly / @annually (0 0 1 1 *), @monthly, @weekly, @daily, @hourly. This parser does not accept them, so expand the shortcut to its equivalent 5-field expression before pasting it here.

Related Tools