Cron Examples & Cheat Sheet

Common cron patterns for everyday scheduling tasks

Syntax Cheat Sheet

*
Any value
* in hour = every hour
,
List separator
1,3,5 = values 1, 3, and 5
-
Range
1-5 = values 1 through 5
/
Step
*/5 = every 5th value
?
No specific value
Quartz/AWS only
L
Last
L in DOM = last day of month
W
Weekday
15W = nearest weekday to 15th
#
Nth weekday
5#2 = 2nd Friday

Field Order by Platform

PlatformFields
Unix/LinuxMIN HOUR DOM MON DOW
QuartzSEC MIN HOUR DOM MON DOW YEAR
AWSMIN HOUR DOM MON DOW YEAR
SpringSEC MIN HOUR DOM MON DOW
AzureSEC MIN HOUR DOM MON DOW

Common Examples

0 0 * * *
Every day at midnight
Use case: Database backups, log rotation
*/5 * * * *
Every 5 minutes
Use case: Health checks, cache refresh
0 9 * * 1-5
Weekdays at 9 AM
Use case: Daily standup reminders
0 0 1 * *
First of every month
Use case: Monthly reports, billing
0 */6 * * *
Every 6 hours
Use case: API sync, data aggregation
30 4 * * 0
Sunday at 4:30 AM
Use case: Weekly maintenance window
0 8,12,17 * * 1-5
Three times daily on weekdays
Use case: Status notifications
0 0 15 * *
15th of every month
Use case: Mid-month reviews
*/15 9-17 * * 1-5
Every 15min during business hours
Use case: Monitoring during peak
0 22 * * 5
Friday at 10 PM
Use case: End-of-week deployments