09 / DevOps / cron-generator
Cron Generator
Compose cron expressions field by field.
How to use
- 01Type a full five-field cron expression into the Cron expression box, or click one of the Common schedules presets to start from a known pattern.
- 02Adjust one field at a time with the Minute, Hour, Day of month, Month and Day of week inputs. Each input shows its allowed range, and clearing a field resets it to *.
- 03Read the Explanation panel, which describes every field in plain English, or flags the expression if it has the wrong number of fields or unsupported characters.
- 04Press Copy expression and paste it into your crontab, CI workflow or scheduler.
What is this tool?
A five-field cron builder and reader. You can edit the whole expression or one field at a time, and the Explanation panel describes the schedule in plain English as you type. Presets cover common schedules such as every 5 minutes, weekdays at 9am and the first of the month. Fields accept numbers, *, ranges (1-5), lists (9,13,17) and steps (*/15). The tool checks the structure only, so pair it with the Cron Expression Tester to confirm the actual run times.
Building a cron expression field by field
Work from left to right and decide what each field should be. A good way to start is to set every field to * and then restrict only the ones that matter. Minute and hour together set the time of day. Day of month, month and day of week set which days the job runs.
For example, to run a cleanup at 2:30 every night, set Minute to 30 and Hour to 2, and leave the rest as *. The result is 30 2 * * *, which the explanation reads as Runs at minute 30, hour 2, every day of month, every month, every day of week. A frequent mistake is leaving Minute as * when you meant a fixed time. * 2 * * * runs every minute from 2:00 to 2:59, not once at 2:00.
Common cron schedules (copy-ready recipes)
Every 6 hours: 0 */6 * * *, which runs at 00:00, 06:00, 12:00 and 18:00. Three times a day: 0 9,13,17 * * *. Weeknights at 10pm: 0 22 * * 1-5. Weekends at 3am: 0 3 * * 6,0. Mid-month at midnight: 0 0 15 * *. Once a year, on January 1: 0 0 1 1 *. Business hours every 15 minutes: */15 9-17 * * 1-5, the default expression.
The built-in presets add every minute (* * * * *), every 5 minutes (*/5 * * * *), hourly (0 * * * *), daily at midnight (0 0 * * *), weekdays at 9am (0 9 * * 1-5), every Sunday (0 0 * * 0) and the first of the month (0 0 1 * *). Always set the minute to a fixed value such as 0 for hourly and daily jobs, or the job will run sixty times in that hour.
What the generator checks, and what it does not
The generator requires exactly five fields made of digits and the characters *, comma, hyphen and slash. Six-field expressions with seconds, @daily-style macros, names such as MON or JAN, and Quartz symbols such as ? and L are flagged. Day of week uses 0-6 with Sunday as 0.
It does not check that values fall inside each field's range, so a typo such as 90 in the minute field still gets an explanation. The explanation also reads each field on its own and does not cover combined forms such as 0-30/10 precisely. Before you deploy, paste the expression into the Cron Expression Tester, which validates ranges and lists the next run times.
Common use cases
- Building schedules for CI pipelines, backups and report jobs
- Setting up scheduled database maintenance or cache-warming tasks
- Reading an unfamiliar cron line in a repository or crontab
- Converting a requirement such as weeknights at 10pm into cron syntax
- Teaching cron syntax during onboarding
FAQ
How do I write a cron expression for every day at a specific time?
Set the minute and hour, and leave the other fields as *. For example, 0 9 * * * runs every day at 9:00 and 30 2 * * * runs at 2:30.
Which cron format does the generator use?
The standard five-field format: minute, hour, day of month, month and day of week, with Sunday as 0.
What does */5 mean in cron?
It means every fifth unit of that field. In the minute field, */5 runs at minutes 0, 5, 10 and so on.
How do I run a cron job only on weekdays?
Put 1-5 in the day of week field. For example, 0 9 * * 1-5 runs at 9:00 Monday through Friday.
Are seconds, @daily or day names like MON supported?
No. The generator accepts only five numeric fields, so use 0 0 * * * instead of @daily and 1 instead of MON.
Does the generator show when the job will next run?
No. It builds and explains the expression. Use the Cron Expression Tester to see the next and previous run times.
Does it schedule or run the job?
No. It only produces the expression text for you to copy into your scheduler.