Cron Job Every year
Run a task at midnight on January 1st each year. Use the cron string 0 0 1 1 *, see the next 5 execution times, and copy Python, Node.js, Bash and n8n snippets.
Quick Answers
- What does the "Every year" cron expression mean?
- This cron expression is "0 0 1 1 *", which in plain English means: Run a task at midnight on January 1st each year..
- When will this cron expression run next?
- With the expression "0 0 1 1 *", the next execution times are Fri, Jan 01, 2027, 12:00:00 AM UTC, Sat, Jan 01, 2028, 12:00:00 AM UTC, Mon, Jan 01, 2029, 12:00:00 AM UTC.
- How do I use this cron expression?
- Copy the exact string into crontab, cron triggers, or any scheduler such as GitHub Actions, n8n or Docker. Pre-built code snippets for Python, Node.js, Bash, Docker, GitHub Actions and n8n are included on this page.
Cron Expression
Copy this exact string into crontab, cron triggers, or schedulers.
0 0 1 1 *Human readable
Run a task at midnight on January 1st each year.
Next 5 execution times
- 1Fri, Jan 01, 2027, 12:00:00 AM UTC
- 2Sat, Jan 01, 2028, 12:00:00 AM UTC
- 3Mon, Jan 01, 2029, 12:00:00 AM UTC
- 4Tue, Jan 01, 2030, 12:00:00 AM UTC
- 5Wed, Jan 01, 2031, 12:00:00 AM UTC
Python
from crontab import CronTab
from datetime import datetime
# Install: pip install python-crontab
cron = CronTab(user=True)
job = cron.new(command="/usr/bin/python3 /var/www/job_every-year.py", comment="scheduled by crongen")
job.setall("0 0 1 1 *")
cron.write()
print(f"Installed: 0 0 1 1 * -> /usr/bin/python3 /var/www/job_every-year.py")