T
ToolPrime

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

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

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.

Related Cron Expressions