⏰Cron Schedules
Yearly (Annual)
Run once per year on January 1st at midnight.
Pattern
0 0 1 1 *Explanation
Runs at the start of each new year. Perfect for annual reports and renewals.
Examples
Cron Expression
Output
0 0 1 1 *
Runs On
Output
January 1 at 00:00 (New Year's Day)
Code Examples
Crontab
# Crontab entry
0 0 1 1 * /path/to/annual-report.sh
# Alternative: Specific time
0 9 1 1 * /path/to/annual-task.sh # 9 AM on Jan 1
# Breakdown:
# 0 - At minute 0
# 0 - At hour 0 (midnight)
# 1 - On day 1
# 1 - In January
# * - Any day of week Node.js
// Node-cron
const cron = require('node-cron');
cron.schedule('0 0 1 1 *', () => {
const year = new Date().getFullYear();
console.log(`Running annual report for ${year}`);
// Generate annual summary
generateAnnualReport(year - 1); // Previous year's data
// Reset annual counters
resetAnnualMetrics();
});Try it Now
💡 Tips
- Consider running on Jan 2 or later to ensure all data is in
- Perfect for license renewals
- Archive previous year's data
- Send annual summary emails
- Reset annual counters and metrics
- Avoid midnight due to New Year celebrations load
- Test thoroughly - only runs once per year!
⚠️ Common Pitfalls
- Only one chance per year - test well!
- System downtime on Jan 1 means missed run
- Consider fiscal year vs calendar year
- New Year's Day may have high system load
- Timezone matters for global systems