Cron Expression: Cron Every 6 Months

Learn how to create a cron expression for 'cron every 6 months'. Runs January 1st and July 1st at midnight with our free generator tool.

Cron Expression

0 0 1 1,7 *

Want to tweak this schedule?

Edit this expression in our interactive generator and see it broken down in real time.

Open in Cron Generator

Expression Breakdown

0
Minute
(0-59)
0
Hour
(0-23)
1
Day
(1-31)
1,7
Month
(1-12)
*
Weekday
(0-6)
Field Value Meaning
Minute 0 At minute 0
Hour 0 At hour 0
Day of Month 1 Day 1
Month 1,7 Months 1,7
Day of Week * Any day of the week

This cron expression represents: cron every 6 months

Cron Expression

0 0 1 1,7 *

What This Expression Does

Runs twice per year: at midnight on January 1st and July 1st. The 1,7 list in the month field selects January and July, and the 1 in the day-of-month field pins the run to the first of each.

Use Cases

Semi-annual jobs tend to be housekeeping with a long horizon:

How to Use

  1. Copy the cron expression above
  2. Open your crontab with crontab -e
  3. Add a new line with: 0 0 1 1,7 * /path/to/your/script.sh
  4. Save and exit

Why Not */6 in the Month Field?

0 0 1 */6 * looks like “every 6 months” but the step starts at month 1, selecting January and July — the same as 1,7, so it happens to work. The list form is preferred because it’s explicit: change it to 4,10 and you instantly have an April/October cycle, no step arithmetic required.

Alternative Formats