Cron Expression for Every January 1st
Run a cron job on January 1st at midnight using 0 0 1 1 *. The yearly schedule for New Year tasks and annual processing.
Expression
0 0 1 1 * At 00:00 on January 1st
Use Cases
- • Generating annual reports
- • Resetting yearly counters and quotas
- • Running year-end data archival
- • Triggering annual license or certificate renewals
Code Examples
Crontab
# At 00:00 on January 1st
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 January 1st" systemd Timer
[Unit]
Description=Every January 1st timer
[Timer]
OnCalendar=*-*-* *:*:00
Persistent=true
[Install]
WantedBy=timers.target Tips
- ✓ Only runs once per year, so test thoroughly before deploying
- ✓ Use @yearly or @annually as shorthand in most cron implementations
- ✓ Consider running at a specific business hour: 0 9 1 1 *
- ✓ Have a manual trigger mechanism as backup for annual jobs
Frequently Asked Questions
What is the cron expression for yearly?
0 0 1 1 * runs once a year on January 1st at midnight. The @yearly and @annually shorthands are equivalent.
Can I run on a different date each year?
Yes, change the day and month fields. For example, 0 0 15 6 * runs on June 15th, and 0 0 1 7 * runs on July 1st.