How to use the Cron Expression Generator tool
- Build or paste a schedulePick a pattern such as an interval in minutes, once a day, workdays only, or a weekly, monthly or annual slot; alternatively type the five fields yourself.
- Read the explanationThe schedule is spelled out in everyday words, and any mistake is pointed out field by field.
- Check upcoming runsView the next 10 execution times in your local zone or in UTC, as most servers use.
- Copy itGrab the expression alone, or a full crontab line with a placeholder command.
Cron generator features
- Explains any cron expressionHandles ranges (1-5), lists (8,20), steps (*/10), month and day names (FEB, WED) and shortcuts like @weekly.
- Exact next runsUpcoming executions are computed exactly, and the tricky OR behaviour between the date and weekday fields is respected.
- Helpful error messagesToo many columns, impossible numbers, backwards ranges and blanks are flagged, naming the column at fault.
- Visual schedule builderMake the everyday schedules from drop-down menus without writing syntax.
- Example libraryTap any sample schedule to load it and read what it does.
How to read a cron expression
Classic cron uses five values separated by spaces. From left to right they are:
- Minute, 0 to 59:
45fires at minute 45. - Hour, 0 to 23:
7is 7 am and19is 7 pm. - Day of month, 1 to 31:
15is the fifteenth. - Month, 1 to 12 or JAN to DEC:
*means every month. - Day of week, 0 to 6 or SUN to SAT, where 7 also means Sunday:
6is Saturday.
Special characters: * stands for every value, a comma builds a list (8,20), a hyphen sets a range (10-16) and a slash sets a step (*/10, every tenth). Many systems also accept nicknames: @yearly, @monthly, @weekly, @daily and @hourly.
Cron expression examples
* * * * *runs every single minute.*/10 * * * *runs every ten minutes.15 * * * *runs at quarter past every hour.0 2 * * *runs daily at 02:00, a popular time for backups.0 8 * * 1-5runs at 08:00 on weekdays.0 */4 * * *runs every four hours, starting at midnight.0 6 * * 6runs every Saturday at 06:00.0 0 1,15 * *runs at midnight on the 1st and 15th of each month.*/20 10-18 * * 1-5runs every 20 minutes between 10:00 and 18:59 on weekdays.
Cron pitfalls to watch for
- Server clocks run on UTC. A line reading
0 9 * * *on a typical host executes at nine o’clock Coordinated Universal Time, which is mid-afternoon in India and before dawn on the US east coast. Flip the preview to UTC before trusting your hours. - Two day fields means “either”. Filling in both the date and the weekday, as in
0 0 13 * 5, doesn’t target only Friday the 13th; traditional cron fires whenever either condition is true. - Extra fields break crontab. Java-based schedulers like Quartz and Spring, and certain cloud services, expect a seconds or year column. Plain crontab rejects them, so trim back to five.
- A star in the minute column repeats the job. Writing
* 9 * * *launches it once per minute for the entire nine o’clock hour; put a 0 there for one run. - There’s no “last day” symbol. Classic cron lacks Quartz’s L, so the usual workaround is to schedule the 28th to the 31st and have the script exit unless the next day is the first.
Putting the expression to work
On a Linux or Mac machine, open your table with crontab -e and append something like 0 2 * * * /opt/scripts/nightly.sh. Hosting panels such as cPanel provide a Cron Jobs page with one box per field. In a GitHub workflow the string goes under the schedule trigger and is always read as UTC; Kubernetes expects it in a CronJob’s spec.schedule; and in Laravel you call ->cron('0 2 * * *') on a scheduled task. Decoding epoch values from job logs is easiest with our Timestamp Converter, and pattern matching can be tried out in the Regex Tester.