Cron every year

The cron expression for every year is:

0 0 1 1 *

Runs once a year, on January 1 at 00:00.

Once a year
Standard 5-field cron

Next 10 runs

For 0 0 1 1 *, in the timezone you pick. Cron uses the server's timezone.

Times in UTC as of the last site update. They refresh when the page loads in a browser.

#Date and timeWhen
1Jan 1, 2027, 00:00Friday
2Jan 1, 2028, 00:00Saturday
3Jan 1, 2029, 00:00Monday
4Jan 1, 2030, 00:00Tuesday
5Jan 1, 2031, 00:00Wednesday
6Jan 1, 2032, 00:00Thursday
7Jan 1, 2033, 00:00Saturday
8Jan 1, 2034, 00:00Sunday
9Jan 1, 2035, 00:00Monday
10Jan 1, 2036, 00:00Tuesday

How to read 0 0 1 1 *

0 0 sets midnight. 1 1 in the day-of-month and month fields is January 1.

FieldValueMeaningAllowed
Minute0At the top of the hour0-59
Hour0At 12:00 AM0-23
Day of month1On the 1st1-31
Month1In January1-12 or jan-dec
Weekday*Every day of week0-7 or sun-sat

Watch out for

  • @yearly and @annually are shortcuts for 0 0 1 1 * in most cron versions.
  • A job that runs once a year has a year for its credentials, paths and dependencies to go out of date. Monitor it so you hear on January 1 if it did not run, not months later.

Often used for: Yearly archiving, renewals and resets.

Use it in

crontab

0 0 1 1 * /path/to/your-script.sh

Edit with crontab -e. Runs in the server's timezone.

Kubernetes CronJob

apiVersion: batch/v1
kind: CronJob
metadata:
  name: my-job
spec:
  schedule: "0 0 1 1 *"
  timeZone: "Etc/UTC"
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure
          containers:
            - name: my-job
              image: busybox:1.36
              command: ["sh", "-c", "date"]

Without timeZone, the schedule follows the timezone of the kube-controller-manager.

GitHub Actions

on:
  schedule:
    - cron: '0 0 1 1 *'
      timezone: "Etc/UTC"
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: ./your-script.sh

Without timezone, GitHub runs schedules in UTC. It runs them at most every 5 minutes, and a run can start late when GitHub is busy.

All cron schedules

Cron does not tell you when a job stops

Know when a job on this schedule does not run.

Your job pings Drumbeats when it finishes. If a ping does not arrive on schedule, you get an alert. No SDK, free for up to 50 monitors.

Free for up to 50 monitors · Setup in 60 seconds · No credit card required