Run a cron job annually on January 1st with 0 0 1 1 *.
The cron expression 0 0 1 1 * runs at 00:00 on January 1st each year. The month field (1) restricts execution to specific months, and the day-of-month field (1) pinpoints the exact date. This produces 1 execution per year. Annual schedules are used for: yearly compliance reports, subscription renewal processing, annual data archival, fiscal year closing tasks, certificate rotation reminders, and birthday/anniversary notifications. Running once or a few times per year ensures these infrequent but critical tasks are not forgotten. For Quartz Scheduler, use 0 0 1 1 ? (swap dow to ?). For AWS EventBridge, use cron(0 0 1 1 ? *) (add year field). For Kubernetes CronJob, use schedule: "0 0 1 1 *" directly. Cron does not support "last day of February" or "Nth weekday of March" natively. For complex annual schedules, use a daily cron with date-checking logic in your script. The @yearly shortcut is equivalent to 0 0 1 1 * (midnight on January 1st).
The expression 0 0 1 1 * means: at minute 0, hour 0, day-of-month 1, month 1, day-of-week *. Each field in the cron expression controls a different time component: minute, hour, day of month, month, and day of week.
Run crontab -e in your terminal to open your crontab editor. Add a new line: 0 0 1 1 * /path/to/your/script.sh. Save and exit. Verify with crontab -l. Make sure your script is executable (chmod +x script.sh) and uses full paths for all commands.
Quartz Scheduler: 0 0 1 1 *. AWS EventBridge: cron(0 0 1 1 ? *). Kubernetes CronJob: schedule: "0 0 1 1 *" (standard 5-field format). Each platform has slight syntax differences — use our dialect switcher above to get the exact expression.
Change the day-of-month field. For example, 0 0 15 1 * runs on the 15th instead of the 1. For "last Friday of March," you need script-side date logic — cron cannot express this natively.
Common pitfalls: (1) Cron uses a minimal PATH — always use full paths to commands and scripts. (2) Percent signs (%) must be escaped with backslash in crontab. (3) Cron runs in the system timezone — set CRON_TZ=UTC at the top of your crontab for consistent UTC scheduling. (4) Redirect output to prevent email spam: 0 0 1 1 * /path/command >> /var/log/myjob.log 2>&1. (5) Test your cron expression with crontab.guru or our validator above before deploying.
The cron expression 0 0 1 1 * has different syntax on various scheduling platforms. Here is the equivalent expression for each:
| Platform | Expression |
|---|---|
| Unix / Linux crontab | 0 0 1 1 * |
| Quartz Scheduler (Java) | 0 0 1 1 * |
| AWS EventBridge | cron(0 0 1 1 ? *) |
| Kubernetes CronJob | 0 0 1 1 * |
| Vercel Cron | 0 0 1 1 * |
| GitHub Actions | 0 0 1 1 * (UTC) |
Key differences across platforms: Quartz uses 7 fields starting with seconds and supports L (last) and W (weekday) modifiers. AWS EventBridge requires a 6th year field and uses ? instead of * in day fields when the other day field is specified. Kubernetes uses standard 5-field Unix cron. Vercel Cron uses the same format but schedules are defined in vercel.json. GitHub Actions uses standard cron but runs in UTC timezone only, so adjust the hour field for your local timezone offset.
Follow these tips when setting up cron jobs in production: