Cron Expression Explainer

Paste an expression to get a plain-English explanation, the next run times and crontab / Spring / Quartz conversions.

    Next run times

      Convert to other syntaxes

      Ready-to-use config

      Cron field reference

      #FieldAllowed valuescrontabSpringQuartz
      -Second0-59none1st1st
      1Minute0-591st2nd2nd
      2Hour0-232nd3rd3rd
      3Day of month1-313rd4th4th
      4Month1-12 or JAN-DEC4th5th5th
      5Day of weekSUN-SAT0-7 (0, 7 = Sun)0-7 (0, 7 = Sun)1-7 (1 = Sun)
      -Year1970-2099nonenone7th (optional)

      Special characters

      CharMeaningExampleSupported in
      *Any value* * * * * every minuteAll
      ,List0 9,18 * * * at 9 and 18All
      -Range0 9 * * 1-5 Mon-FriAll
      /Step*/15 * * * * every 15 minAll
      ?No specific value (day fields)0 0 9 ? * MONSpring, Quartz
      LLast (day of month, last X weekday)0 0 0 L * * last daySpring, Quartz
      WNearest weekday0 0 9 15W * ?Spring, Quartz
      #Nth weekday of the month0 0 9 ? * MON#2 2nd MondaySpring, Quartz

      Common cron examples

      Frequently asked questions

      How is Spring cron different from Linux crontab?

      Spring has a leading seconds field, so it has 6 fields (second minute hour day month weekday); crontab has 5 (minute hour day month weekday). Also, when both day-of-month and day-of-week are set, crontab runs when either matches (OR), while Spring requires both (AND).

      What day is 1 in Quartz?

      In Quartz, 1 = Sunday, 2 = Monday … 7 = Saturday. crontab and Spring use 0 (or 7) = Sunday and 1 = Monday. The same "1-5" means Sunday to Thursday in Quartz, so weekday names like MON-FRI are safer.

      Why does Quartz need "?"?

      Quartz cannot set day-of-month (4th field) and day-of-week (6th field) at the same time, so the unused one must be "?". Every day at 9: 0 0 9 * * ?. Weekdays at 9: 0 0 9 ? * MON-FRI.

      How do I run on the last day of the month?

      Spring and Quartz accept L in the day-of-month field (for example 0 0 0 L * *). crontab has no L, so run on days 28-31 and check inside the script whether tomorrow is the 1st.

      Why does my GitHub Actions schedule run at the wrong hour?

      GitHub Actions schedules always use UTC. Convert your local time to UTC before writing the cron expression.