Field-by-field breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | 0 |
| Hour | 0 | 0 |
| Day of month | 1 | 1 |
| Month | */3 | January, April, July, and October |
| Day of week | * | Every day of the week |
Copy-paste examples
Linux crontab
# crontab -e
0 0 1 */3 * /usr/local/bin/my-job.sh >> /var/log/my-job.log 2>&1
Kubernetes CronJob
apiVersion: batch/v1
kind: CronJob
metadata:
name: my-job
spec:
schedule: "0 0 1 */3 *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: my-job
image: busybox:1.36
command: ["sh", "-c", "date; echo Hello from cron"]
GitHub Actions
on:
schedule:
- cron: '0 0 1 */3 *' # always UTC
GitHub Actions evaluates schedules in UTC, does not accept macros such as @daily, and will not run workflows more often than every 5 minutes; runs can also be delayed during periods of high load.
Common variations
Click an expression to load it into the tool above.
| Cron expression | Schedule |
|---|---|
| At 12:00 AM, on day 1 of the month, only in January, April, July, and October. | |
| At 9:00 AM, on day 1 of the month, only in January, April, July, and October. | |
| At 12:00 AM, on day 1 of the month, only in March, June, September, and December. | |
| At 12:00 AM, on day 1 of the month, only in January and July. |
Frequently asked questions
What does 0 0 1 */3 * mean in cron?
At 12:00 AM, on day 1 of the month, only in January, April, July, and October. The five fields are minute 0, hour 0, day of month 1, month */3 and day of week *.
How do I run a cron job every quarter in Linux?
Run crontab -e, add the line 0 0 1 */3 * /path/to/command, then save and exit. Use absolute paths, redirect output to a log file, and confirm it runs with grep CRON /var/log/syslog.
When will 0 0 1 */3 * run next?
It depends on the current time and the time zone of the machine running cron. The calculator on this page shows the next 5 run times in your local time zone; on a server, cron uses the system time zone, which is often UTC.