Cron job every 6 months (Jan 1st and Jul 1st)
0 0 1 1,7 * At 12:00 AM, on day 1 of the month, only in January and July
Typical use: half-yearly key rotation and audits. Try it below — change any field and see the next runs in your timezone.
At 12:00 AM, on day 1 of the month, only in January and July
Valid
- 1Fri, Jan 1, 2027, 12:00 AM
- 2Thu, Jul 1, 2027, 12:00 AM
- 3Sat, Jan 1, 2028, 12:00 AM
- 4Sat, Jul 1, 2028, 12:00 AM
- 5Mon, Jan 1, 2029, 12:00 AM
- 6Sun, Jul 1, 2029, 12:00 AM
- 7Tue, Jan 1, 2030, 12:00 AM
- 8Mon, Jul 1, 2030, 12:00 AM
- 9Wed, Jan 1, 2031, 12:00 AM
- 10Tue, Jul 1, 2031, 12:00 AM
Field by field
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | minute 0 |
| Hour | 0 | hour 0 |
| Day of month | 1 | day 1 |
| Month | 1,7 | months January, July |
| Day of week | * | every day |
The same schedule on every platform
The five fields mean the same thing everywhere, but each scheduler wraps them differently — and AWS and Quartz number weekdays from 1 (Sunday), not 0.
0 0 1 1,7 * /path/to/script.sh >> /var/log/job.log 2>&1 spec:
schedule: "0 0 1 1,7 *" GitHub ActionsRuns in UTC.
on:
schedule:
- cron: '0 0 1 1,7 *' AWS EventBridgeEventBridge weekdays are 1–7 (1 = Sunday) and one day field must be ?.
cron(0 0 1 1,7 ? *) Quartz (Java)Seconds first; weekdays 1–7 with 1 = Sunday.
0 0 0 1 1,7 ? Spring @ScheduledSpring adds a seconds field but keeps Unix weekday numbers.
@Scheduled(cron = "0 0 0 1 1,7 *") [TimerTrigger("0 0 0 1 1,7 *")] Running a job every 6 months (Jan 1st and Jul 1st)
What is the cron expression for every 6 months (Jan 1st and Jul 1st)?
0 0 1 1,7 *. In plain English: at 12:00 AM, on day 1 of the month, only in January and July. It works in standard 5-field cron — Linux crontab, Kubernetes and GitHub Actions.How do I schedule a job every 6 months (Jan 1st and Jul 1st) in AWS EventBridge?
Use
cron(0 0 1 1,7 ? *). EventBridge needs six fields (a year at the end), a ? in one of the day fields, and numbers weekdays 1–7 starting on Sunday.What timezone does "0 0 1 1,7 *" run in?
Cron uses the server's timezone. Kubernetes CronJobs default to the controller's timezone (set
spec.timeZone on 1.27+), GitHub Actions and AWS EventBridge rules always use UTC. Use the timezone picker above to see the next runs in your own time.