Cron Expression for Every Year
Run a cron job once per year on January 1st at midnight using 0 0 1 1 *. Identical to @yearly, used for annual maintenance and reporting.
Expression
0 0 1 1 * At 00:00 on January 1st (annually)
Use Cases
- • Running annual data retention cleanup
- • Generating year-in-review reports
- • Renewing annual subscriptions or certificates
- • Triggering annual compliance audits
Code Examples
Crontab
# At 00:00 on January 1st (annually)
0 0 1 1 * /path/to/your/script.sh GitHub Actions
name: Scheduled Job
on:
schedule:
- cron: '0 0 1 1 *'
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "Running Every Year (Annually)" systemd Timer
[Unit]
Description=Every Year (Annually) timer
[Timer]
OnCalendar=*-*-* *:*:00
Persistent=true
[Install]
WantedBy=timers.target Tips
- ✓ @yearly and @annually are supported shorthands
- ✓ Identical to the every-january-first expression
- ✓ Since it runs once a year, add monitoring and alerting
- ✓ Consider a fiscal year start date if your company does not use calendar year
Frequently Asked Questions
Is there an @yearly shorthand?
Yes, both @yearly and @annually are equivalent to 0 0 1 1 *, supported by most cron implementations.
How do I run annually on a date other than January 1?
Specify the desired month and day: 0 0 1 4 * for April 1st, 0 0 15 3 * for March 15th, etc.