Cron Expression for Every 6 Months

0 0 1 1,7 *

At 12:00 AM, on day 1 of the month, only in January and July. Semi-annual audits, password rotation reminders, or license checks.

Field-by-field breakdown

FieldValueAllowed rangeMeaning
Minute00–59at minute 0
Hour00–23at hour 0
Day of month11–31on day 1
Month1,71–12January and July
Day of week*0–6 (Sunday = 0)every day of the week

Next 5 runs (your time zone)

Calculating upcoming runs…

Cron uses the time zone of the machine or scheduler that runs it, which is often UTC on servers.

How to use this schedule

crontab

0 0 1 1,7 * /path/to/script.sh >> /var/log/job.log 2>&1

Kubernetes CronJob

apiVersion: batch/v1
kind: CronJob
metadata:
  name: my-job
spec:
  schedule: "0 0 1 1,7 *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: my-job
              image: busybox
              command: ["sh", "-c", "echo running"]
          restartPolicy: OnFailure

GitHub Actions

on:
  schedule:
    - cron: '0 0 1 1,7 *'  # UTC

Frequently Asked Questions

What is the cron expression for every 6 months?

Use "0 0 1 1,7 *". In plain English: At 12:00 AM, on day 1 of the month, only in January and July.

What does "0 0 1 1,7 *" mean?

Minute: at minute 0; Hour: at hour 0; Day of month: on day 1; Month: January and July; Day of week: every day of the week.