⏰Cron Schedules
Business Hours (9 AM - 5 PM Weekdays)
Run every hour during business hours on weekdays only.
Pattern
0 9-17 * * 1-5Explanation
Runs at the start of each hour from 9 AM to 5 PM, Monday through Friday.
Examples
Cron Expression
Output
0 9-17 * * 1-5
Runs
Output
Mon-Fri: 09:00, 10:00, 11:00... 17:00
Skips
Output
Weekends and 18:00-08:00
Code Examples
Crontab
# Crontab entry
0 9-17 * * 1-5 /path/to/business-task.sh
# Breakdown:
# 0 - At minute 0
# 9-17 - Hours 9 through 17 (9 AM to 5 PM)
# * - Every day of month
# * - Every month
# 1-5 - Monday (1) through Friday (5) Node.js with Timezone
// Node-cron
const cron = require('node-cron');
// Business hours only
cron.schedule('0 9-17 * * 1-5', () => {
console.log('Running during business hours');
checkBusinessMetrics();
}, {
timezone: "America/New_York"
});Try it Now
💡 Tips
- Perfect for user-facing notifications
- Set timezone explicitly for multi-region teams
- Consider excluding lunch hour (12:00) if needed
- Add holiday calendar check in script
- Great for API calls during working hours
⚠️ Common Pitfalls
- Timezone matters - use server or app timezone
- Doesn't account for holidays
- 17:00 = 5 PM runs, but 18:00 = 6 PM does not
- Different regions have different business hours