About the Cron Generator
A cron expression is five fields separated by spaces — minute, hour, day of month, month and day of week — and each field can be * (every value), a step such as */15, a list such as 0,15,30,45 or a range such as 9-17. The generator lets you choose one of these forms for every field and writes the expression for you: “every 15 minutes, from 9 to 17, Monday to Friday” becomes */15 9-17 * * 1-5. It works in both directions, so you can also type or paste an expression and see the controls move to match it. Syntax that has no control, such as L or MON#2, is kept exactly as typed.
The result is checked three ways: the description in words comes from the open-source cronstrue library, the next five run times are calculated by the same scheduler as the Cron Parser, and warnings point out the classic traps. The best known one is that cron ORs the two day fields: 0 0 13 * 5 runs on every 13th and on every Friday, not only on Friday the 13th. Another is that a step starts again at the beginning of the range, so */7 in the minute field runs at 0, 7 … 56 and then at 0 again, four minutes later.
Schedulers do not agree on the details, so the expression is also written in the dialects you are likely to need. crontab, GitHub Actions and Kubernetes CronJobs use five fields; GitHub always evaluates them in UTC and Kubernetes does too unless spec.timeZone is set. Spring and node-cron accept a sixth field for seconds in front. Quartz requires ? in either the day of month or the day of week, and counts weekdays from 1 = Sunday, which is why the Quartz form uses names such as MON-FRI instead of numbers.
How to use it
- Start from a quick template such as “Daily at time”, or go straight to the fields.
- For each field choose Every, Every n-th, Specific values or Range, and pick the values.
- Read the description and the next 5 runs to confirm the schedule does what you expect.
- Switch the next runs between local time and UTC to match the machine that will run the job.
- Copy the expression, or the snippet for crontab, GitHub Actions, Kubernetes, Spring or Quartz.