CRON Syntax Quick Reference
| Pattern | Meaning | Example |
|---|---|---|
* | Every value | * in hour = every hour |
*/n | Every n-th value | */5 in minute = every 5 min |
n | Specific value | 9 in hour = 9 AM |
n-m | Range | 1-5 in weekday = MonβFri |
n,m,p | List | 1,15 in dom = 1st and 15th |
n-m/p | Range with step | 0-12/2 in hour = every 2h, midnightβnoon |
About CRON Expressions
CRON is a time-based job scheduler used in Unix-like systems. A CRON expression is a compact string of five fields that defines when a task should run: minute, hour, day of month, month, and day of week.
- Use
*to mean "every" β* * * * *runs every minute - Use
*/nfor intervals β*/15 * * * *runs every 15 minutes - Use
n-mfor ranges β0 9 * * 1-5runs at 9 AM on weekdays - Separate multiple values with commas β
0 9,17 * * *runs at 9 AM and 5 PM
Learn more in the companion guide: Understanding CRON Expressions with Examples.
Frequently Asked Questions
What is a CRON expression?
A CRON expression is a string with five space-separated fields that defines a recurring schedule: minute (0β59), hour (0β23), day-of-month (1β31), month (1β12), and day-of-week (0β6, where 0 = Sunday). For example, 0 9 * * 1-5 means every weekday at 9:00 AM.
What does * mean in CRON?
An asterisk (*) means "every valid value" for that field. For example, * in the minute field means every minute, and * in the hour field means every hour.
How do I run a CRON job every 5 minutes?
Use */5 * * * *. The / syntax means "step" β */5 means every 5th value starting from 0 (so 0, 5, 10, 15, β¦).
Can CRON run on a specific day and day of week at the same time?
Yes. If both the day-of-month and day-of-week fields are restricted (not *), most CRON implementations use OR logic β the job runs when either condition matches. This tool follows the same behaviour.