Cron every 6 months
The cron expression 0 0 1 1,7 * runs at 00:00, on day 1 of the month, in January and July. Below: what each field means, its next runs in your time zone, and how to get an alert if it stops.
0Minute0Hour1Day of month1,7Month*Day of weekAt 00:00, on day 1 of the month, in January and July.
What does 0 0 1 1,7 * mean?
At 00:00, on day 1 of the month, in January and July.
| Field | Written | Means |
|---|---|---|
| Minute | 0 | 0 |
| Hour | 0 | 0 |
| Day of month | 1 | 1 |
| Month | 1,7 | January and July |
| Day of week | * | every day of week |
How often does it run?
On a day it runs, it runs once. It runs on 2 days of 2027, 2 runs in all. The gap between runs is not constant: it varies from 181 days to 184 days.
- Runs on a day it runs
- 1
- Days it runs in 2027
- 2
- Runs in 2027
- 2
- Shortest gap
- 184 days
When is this schedule useful?
Twice-yearly tasks: rotating long-lived credentials, reviewing access, or pruning archives.
What should you watch out for?
Jobs this rare tend to break between runs, when the code or credentials they rely on change. A start ping and a check catch a run that never happens.
What happens when the clocks change?
On Sunday 14 March 2027, clocks in America/New_York jump from 02:00 to 03:00. This schedule does not run that day, so the change does not touch it.
On Sunday 1 November 2026, clocks in America/New_York fall back from 02:00 to 01:00, so the hour from 01:00 happens twice. This schedule does not run that day, so the change does not touch it.
A server that keeps its clock on UTC never sees either change. The next run calculator previews any zone.
How do you write it for other schedulers?
| Scheduler | Expression | Notes |
|---|---|---|
| Kubernetes CronJob | 0 0 1 1,7 * | Exact |
| GitHub Actions | 0 0 1 1,7 * | Exact |
| Vercel Cron | 0 0 1 1,7 * | Vercel runs cron jobs in UTC; write the hours in UTC. |
| Quartz | 0 0 0 1 1,7 ? | Exact |
| Spring @Scheduled | 0 0 0 1 1,7 * | Exact |
| AWS EventBridge | cron(0 0 1 1,7 ? *) | Exact |
| systemd OnCalendar | *-01,07-01 00:00:00 | Exact |
How do you get an alert when it stops running?
Create a cron check with the schedule 0 0 1 1,7 * and 5 minutes of grace, then ping it at the end of the job. If a run does not report in by the end of the grace time, CronMissed sends an alert.
0 0 1 1,7 * /usr/local/bin/job.sh && curl -fsS --max-time 10 --retry 5 --retry-connrefused -o /dev/null "https://ping.cronmissed.com/5f0c1b2e-7a3d-4c8e-9b61-2d4f8a7e3c10"The snippet builder writes the same ping for systemd, GitHub Actions, Vercel, Kubernetes and backup scripts.
Questions and answers
- At 00:00, on day 1 of the month, in January and July.
- On a day it runs, it runs once. It runs on 2 days of 2027, 2 runs in all. The gap between runs is not constant: it varies from 181 days to 184 days.
- Create a cron check with the schedule 0 0 1 1,7 * and 5 minutes of grace, then add the ping to the end of the job so it requests the check URL after each successful run. If a run does not report in by the end of the grace time, CronMissed alerts you by email, Slack, Discord, Telegram, ntfy or webhook.
What does 0 0 1 1,7 * mean in cron?
How often does 0 0 1 1,7 * run?
How do I get an alert when this job stops running?
Know the first time this schedule misses a run
CronMissed expects a ping at every run of 0 0 1 1,7 *. When one is late or reports a failure, you get an alert by email, Slack, Discord, Telegram, ntfy or webhook.