A cron expression is a string of five (or six) space-separated fields that defines a recurring schedule in Unix-like operating systems. The standard format is: minute (0-59), hour (0-23), day of month (1-31), month (1-12), day of week (0-7). Cron is used by crontab on Linux/macOS, systemd timers, Kubernetes CronJobs, AWS EventBridge, and GitHub Actions for scheduling automated tasks.
What is a Cron Expression?
Cron is a time-based job scheduler on Unix-like operating systems. A cron expression defines when a job should run using five fields separated by spaces. Each field controls a different aspect of the schedule.
Cron is everywhere in modern infrastructure: Linux crontabs, GitHub Actions schedules, AWS EventBridge rules, Kubernetes CronJobs, and most CI/CD platforms all use standard cron syntax or close variants.
How does cron syntax work?
A cron expression has five fields, each separated by a space:
| Field | Values | Special chars |
|---|---|---|
| Minute | 0–59 | * , - / |
| Hour | 0–23 | * , - / |
| Day of month | 1–31 | * , - / |
| Month | 1–12 | * , - / |
| Day of week | 0–6 (Sun=0) | * , - / |
Special characters: * means every value,
, separates a list of values,
- defines a range,
/ defines an interval (e.g., */5 = every 5th value).
What are the most common cron schedules?
| Expression | Schedule |
|---|---|
| * * * * * | Every minute |
| */5 * * * * | Every 5 minutes |
| 0 * * * * | Every hour (at minute 0) |
| 0 0 * * * | Every day at midnight |
| 0 9 * * 1-5 | Weekdays at 9:00 AM |
| 0 0 1 * * | 1st of every month at midnight |
Managing a server? You can also set file permissions with our chmod calculator, or convert configuration files between formats with the JSON ↔ YAML converter.