| Expression | Description | Category |
|---|---|---|
* * * * * | Every minute | Frequent |
*/2 * * * * | Every 2 minutes | Frequent |
*/5 * * * * | Every 5 minutes | Frequent |
*/10 * * * * | Every 10 minutes | Frequent |
*/15 * * * * | Every 15 minutes | Frequent |
*/30 * * * * | Every 30 minutes | Frequent |
0 * * * * | Every hour (at :00) | Hourly |
30 * * * * | Every hour at :30 | Hourly |
0 */2 * * * | Every 2 hours | Hourly |
0 */4 * * * | Every 4 hours | Hourly |
0 */6 * * * | Every 6 hours | Hourly |
0 */12 * * * | Every 12 hours | Hourly |
0 0 * * * | Every day at midnight | Daily |
0 1 * * * | Every day at 1:00 AM | Daily |
0 6 * * * | Every day at 6:00 AM | Daily |
0 9 * * * | Every day at 9:00 AM | Daily |
0 12 * * * | Every day at noon | Daily |
0 18 * * * | Every day at 6:00 PM | Daily |
0 23 * * * | Every day at 11:00 PM | Daily |
0 0,12 * * * | Twice daily β midnight and noon | Daily |
0 9 * * 1 | Every Monday at 9:00 AM | Weekly |
0 9 * * 1-5 | Every weekday (MonβFri) at 9:00 AM | Weekly |
0 9 * * MON-FRI | Every weekday at 9 AM (named) | Weekly |
0 0 * * 0 | Every Sunday at midnight | Weekly |
0 0 * * 6,0 | Every Saturday and Sunday at midnight | Weekly |
0 8 * * 1,3,5 | Mon/Wed/Fri at 8:00 AM | Weekly |
0 0 1 * * | 1st of every month at midnight | Monthly |
0 0 15 * * | 15th of every month at midnight | Monthly |
0 0 1,15 * * | 1st and 15th of every month | Monthly |
0 0 L * * | Last day of every month (Quartz/AWS) | Monthly |
0 0 1 */3 * | Every 3 months on the 1st at midnight | Monthly |
0 0 1 1 * | January 1st at midnight (New Year) | Yearly |
0 0 1 1,7 * | January 1st and July 1st at midnight | Yearly |
0 9 * * 1#1 | First Monday of every month at 9 AM (Quartz) | Advanced |
0 0 * * 5L | Last Friday of every month (Quartz) | Advanced |
0/30 9-17 * * MON-FRI | Every 30 min 9 AMβ5 PM on weekdays | Advanced |
5 4 * * sun | 5 min past 4 AM every Sunday | Advanced |
ββββββββββββ minute (0β59) β βββββββββββ hour (0β23) β β ββββββββββ day of month (1β31) β β β βββββββββ month (1β12 or JANβDEC) β β β β ββββββββββ day of week (0β6, Sun=0 or SUNβSAT) β β β β β * * * * * command to execute
| Character | Name | Meaning | Example |
|---|---|---|---|
| * | Wildcard | Any value | * in hour = every hour |
| , | List separator | Multiple values | 1,15 in day = 1st and 15th |
| - | Range | Fromβto inclusive | 1-5 in weekday = MonβFri |
| / | Step | Every N units | */5 in minute = every 5 min |
| ? | No specific value | Ignore field (Quartz/AWS) | ? in day when weekday set |
| L | Last | Last day/weekday | L in day = last day of month |
| W | Weekday | Nearest weekday | 15W = nearest weekday to 15th |
| # | Nth weekday | N-th day in month | 2#1 = 1st Monday |
| Platform | Format | Example |
|---|---|---|
| Linux/macOS crontab | min hr dom mon dow | 0 9 * * 1-5 |
| GitHub Actions | min hr dom mon dow | 0 9 * * 1-5 |
| AWS EventBridge | min hr dom mon dow year | 0 9 ? * MON-FRI * |
| Quartz (Java) | sec min hr dom mon dow [year] | 0 0 9 ? * MON-FRI |
| Kubernetes CronJob | min hr dom mon dow | 0 9 * * 1-5 |
Search a schedule pattern and read each of its five fields before copying it. The first example below combines a list of hours with a weekday range. Compare the intended timezone with your scheduler: GitHub Actions schedules use UTC, while a local crontab depends on its environment. System cron entries can also add a user field after the time fields.
Check day of month and weekday semantics; standard cron combines restricted fields with OR. A schedule for the thirty first skips months without that date. Long jobs can overlap, so use a lock or the shown Kubernetes concurrency policy when appropriate. Check your implementation's support for reboot shorthand and its trailing newline requirement. This reference does not install jobs or execute commands.
0 8,18 * * 1-5
0 0 1 1-12/3 * # Every 3 months starting January (Jan, Apr, Jul, Oct)
0 0 15 * 1
@reboot /usr/local/bin/start-service.sh
# Run backup every day at 2 AM
0 2 * * * /home/user/scripts/backup.sh >> /var/log/backup.log 2>&1
0 2 * * * root /usr/local/bin/cleanup.sh
on:
schedule:
- cron: '0 3 * * 1-5' # Weekdays at 3 AM UTC
0 0 31 * * # Only runs in months with 31 days
apiVersion: batch/v1
kind: CronJob
metadata:
name: nightly-report
spec:
schedule: "0 2 * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
containers:
- name: report
image: reporting:latest
command: ["python", "generate_report.py"]
restartPolicy: OnFailure
A cron expression is a string with 5 or 6 fields (minute, hour, day-of-month, month, day-of-week, and optionally second) that defines when a scheduled task should run. The name comes from the Unix cron daemon which reads a crontab file to schedule jobs.
The asterisk (*) means 'every'. For example, * in the minute field means 'every minute', * in the hour field means 'every hour'. A slash (*\/5) means 'every N units' β *\/5 in minutes means 'every 5 minutes'.
Standard Unix/Linux cron uses 5 fields (minute hour day month weekday). Many modern schedulers like Quartz (Java), AWS EventBridge, and some cloud services add a 6th field for seconds at the beginning, or a 7th for year. Always check your scheduler's documentation.
Use: 0 9 * * 1-5. This means minute=0, hour=9, any day-of-month, any month, weekday Monday(1) through Friday(5). For AWS EventBridge the equivalent cron is: cron(0 9 ? * MON-FRI *).
No. It supplies reference syntax. Your scheduler runs the job and chooses its timezone, environment, and supported dialect. Use locking or an appropriate concurrency policy when a job may outlast its interval. Check restricted weekday/day-of-month semantics and schedules that target dates missing from some months before installing them.