Run Yearly Jobs on January 1st | CronBase

cron expression Standard
$ 0 0 1 1 *

At midnight on the first day of January every year

This standard cron expression schedules a task to run exactly once a year at midnight on January first. It is commonly utilized for annual system tasks such as generating year-end financial ledgers, archiving historical database records to cold storage, resetting yearly usage quotas, and executing major compliance audits across enterprise systems.

Minute
0
Hour
0
Day of Month
1
Month
1
Day of Week
*
How it works

Next 5 Runs

  • in 159d 3h
  • in 524d 3h
  • in 890d 3h
  • in 1255d 3h
  • in 1620d 3h

* Tools

Code & Implementations

Bash
#!/usr/bin/env bash
set -euo pipefail

# Securely append the annual cron job to the user's crontab
CRON_JOB="0 0 1 1 * /usr/local/bin/annual-archive.sh >> /var/log/cron-annual.log 2>&1"

(crontab -l 2>/dev/null | grep -F -q "$CRON_JOB") || (
    (crontab -l 2>/dev/null; echo "$CRON_JOB") | crontab -
    echo "Successfully scheduled annual job in crontab."
)
Setup notes

Save this script as setup-cron.sh, make it executable with chmod +x, and run it to register the annual task in the current user's crontab.

Last verified:

Partner UptimeRobot

Keep this cron job monitored 24/7

UptimeRobot alerts you the moment a scheduled job stops responding. Free plan monitors up to 50 endpoints — no credit card required.

Platform Equivalents

AWS EventBridge

Standard cron expressions often need conversion for AWS EventBridge schedules.

EventBridge Rule
cron(0 0 1 1 ? *)

Systemd Timer

OnCalendar*-01-01 00:00:00

my-task.timer
[Unit]
Description=Timer for cron expression: 0 0 1 1 *

[Timer]
OnCalendar=*-01-01 00:00:00
Persistent=true

[Install]
WantedBy=timers.target

Last verified:

Frequently Asked Questions

How do I test an annual cron job without waiting a full year?

You should design your application logic to be decoupled from the cron scheduler. Expose a secure, authenticated REST endpoint, CLI command, or invoke the execution function directly in a staging environment with mock data to verify behavior.

What happens to the job if a leap second occurs on December 31st?

Standard operating systems and modern NTP servers resolve leap seconds via 'slewing' (gradually adjusting the clock speed). The cron daemon relies on system time, so it will execute normally at midnight without missing the trigger.

How do I handle timezone transitions like Daylight Saving Time for this job?

Always run your cron daemon and schedule your annual jobs in UTC. Running in local timezones can cause the job to run twice or be skipped entirely if the local midnight transition coincides with a DST shift.

What is the best way to monitor a job that runs so infrequently?

Traditional passive monitoring (alerting on failure) is insufficient. Use a 'dead-man's switch' service (like Healthchecks.io or Opsgenie) that expects a ping within a specific window on January 1st and alerts if the ping is missed.

Can I use the @yearly shortcut instead of 0 0 1 1 *?

Yes, in standard Vixie cron and dialects like Kubernetes or Go's robfig/cron, @yearly and @annually are exact equivalents to 0 0 1 1 * and can be used to improve readability.

* Explore

Related expressions you might need

Last verified:

Was this helpful?