The formula
Fields: minute (0–59) hour (0–23) day-of-month (1–31) month (1–12 or JAN–DEC) day-of-week (0–6 or SUN–SAT; 7 = Sunday)
* any value; a,b list; a-b range; */n or a-b/n every n
@hourly = 0 * * * *; @daily = 0 0 * * *; @weekly = 0 0 * * 0; @monthly = 0 0 1 * *; @yearly = 0 0 1 1 *
If both day-of-month and day-of-week are restricted, the job runs when either matches
Worked example
- 30 9 * * 1-5 means "at 09:30 on Monday to Friday".
- If it's now Thursday 08:00, the next runs are Thursday 09:30, Friday 09:30 and then Monday 09:30.
- The gap between Friday's and Monday's runs is 3 days.
What cron expressions are
Cron is the job scheduler built into Unix and Linux, and its five-field expression format has become a standard for scheduling tasks everywhere: in crontab files, Kubernetes CronJobs, GitHub Actions, CI systems, cloud schedulers such as AWS EventBridge and Google Cloud Scheduler, and many application frameworks. Each expression describes when a job should run by listing the allowed minutes, hours, days of the month, months and days of the week. This calculator explains an expression in plain English and lists its next run times, so you can check a schedule before you deploy it.
Reading the five fields
The fields are, in order: minute, hour, day of the month, month and day of the week. An asterisk means every value. A comma separates a list, such as 1,15 for the 1st and 15th. A hyphen gives a range, such as 9-17 for 9 am to 5 pm. A slash sets a step, so */15 in the minute field means every 15 minutes, and 0-30/10 means minutes 0, 10, 20 and 30. Months and days can be written as names, such as JAN or MON. Sunday is 0, and many systems also accept 7.
Common schedules
Some useful patterns: 0 * * * * runs at the start of every hour; */5 * * * * every five minutes; 0 2 * * * at 2 am every day; 0 9 * * 1 at 9 am every Monday; 0 0 1 * * at midnight on the first of each month; and 0 9-17 * * 1-5 on the hour during working hours on weekdays. Macros such as @daily, @hourly and @weekly are shortcuts for common cases. For a job on the last day of the month, standard cron has no direct syntax; a common workaround runs daily and checks the date in the script.
The day-of-month and day-of-week rule
A surprising detail of cron is how it combines the two day fields. If either is an asterisk, only the other one applies. But if both are restricted, cron runs the job when either matches, not both. So 0 0 13 * 5 runs at midnight on every 13th of the month and also on every Friday, not just on Friday the 13th. The calculator applies this rule and adds a note when it affects your expression. Some schedulers, such as Quartz, use a ? to avoid the ambiguity.
Time zones and daylight saving
Traditional cron runs in the server's local time zone, while many cloud schedulers default to UTC. A job set for 0 9 * * * on a UTC server runs at 4 am in New York in winter. Daylight saving transitions can make jobs scheduled between 1 and 3 am run twice or not at all on change days, depending on the implementation. Set the UTC offset to the zone your scheduler uses. Scheduling critical jobs in UTC avoids daylight saving surprises.
Tips for reliable scheduled jobs
Stagger jobs rather than running everything at midnight, to avoid load spikes on your servers and on shared APIs; many teams pick random minutes. Make jobs idempotent so a duplicate run does no harm, and add locking if a job might run longer than its interval. Log start and end times and alert on failures. Our Unix timestamp converter helps when reading logs, and the time zone converter helps you pick sensible times for users in several regions.