Cron in less common patterns
Business hours only, odd or even hours, twice a day: the combinations that need more than one field set at once. 11 schedules below, each with the exact expression, next five runs, the usual mistake and examples in 8 runtimes.
- Quarterly
0 0 1 1,4,7,10 * - Yearly
0 0 1 1 * - Twice a day
0 0,12 * * * - Every 5 minutes during business hours
*/5 9-17 * * 1-5 - Every 15 minutes during business hours
*/15 9-17 * * 1-5 - Every 30 minutes during business hours
*/30 9-17 * * 1-5 - Every hour during business hours
0 9-17 * * 1-5 - Hourly on weekdays
0 * * * 1-5 - Hourly on weekends
0 * * * 0,6 - Every odd hour
0 1-23/2 * * * - Every even hour
0 0-22/2 * * *