Run a Cron Job Every 6 Months
To run a job every six months, use a step in the month field: 0 0 1 */6 * runs at midnight on the 1st of January and July. Always set a specific day-of-month so it fires once, not daily.
The expression
0 0 1 */6 * runs at 00:00 on the 1st day of every 6th month — January (1) and July (7). */6 in the month field steps from January.
Pin the day
The day-of-month 1 is essential. Without it (0 0 * */6 *) the job would run every day in January and July, not just once.
Choose the months explicitly
For a different pair, list them: 0 0 1 3,9 * runs on March 1 and September 1.
FAQ
What is the cron expression for every 6 months?
0 0 1 */6 * runs at midnight on January 1 and July 1. The */6 steps the month field by six.
Why must I set the day to 1?
Without a specific day-of-month the job runs every day in those months. 0 0 1 */6 * fires once per month, on the 1st.
How do I pick different six-month dates?
List the two months explicitly, e.g. 0 0 1 3,9 * for March 1 and September 1.