Cron on January 1st and July 1st
Schedule a cron job on January 1st and July 1st at midnight using 0 0 1 1,7 *. Complete field breakdown for semi-annual and half-year scheduling.
Cron Expression
0 0 1 1,7 *
Field Breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At 0 |
| Hour | 0 | At 0 |
| Day of Month | 1 | At 1 |
| Month | 1,7 | At January, July |
| Day of Week | * | Every day of the week (Sun–Sat) |
Detailed Explanation
The cron expression 0 0 1 1,7 * schedules a task to run twice per year, at midnight on January 1st and July 1st.
Field-by-field breakdown:
0(Minute): At minute 0. The task fires at the top of the hour.0(Hour): At hour 0 (midnight / 12 AM). The task runs at the very start of the day.1(Day of Month): On the 1st day of the month. The task is anchored to the first of the month.1,7(Month): In January and July only. The list notation specifies two months, exactly 6 months apart, creating a semi-annual schedule.*(Day of Week): Every day of the week. No restriction on the day.
This means your task will execute exactly twice per year: at midnight on January 1st and at midnight on July 1st. This semi-annual schedule divides the year into two equal halves and is commonly used for tasks aligned with half-year business cycles. Examples include semi-annual performance review triggers, half-year financial report generation, bi-annual security certificate rotation, and mid-year budget review automation. The January/July split aligns with both calendar half-years and many organizations' fiscal planning cycles. This pattern can be adapted for any two-month combination by changing the month values. This expression is supported by standard cron on Linux/macOS, as well as cloud services like AWS CloudWatch, Google Cloud Scheduler, and GitHub Actions.
Use Case
Perfect for triggering semi-annual SSL certificate renewals and security credential rotations on January 1st and July 1st to maintain a regular rotation cycle.
Try It — Interactive Builder
at min 0, at hour 0, on day 1, in month 1,7
Next 10 Executions
Ctrl+Shift+C to copy expression