Cron Expression for Business Hours

During business hours, 45 times a week
0 9-17 * * 1-5

Cron reads this as: minute 0, past hour 9 through 17, on day-of-week Monday through Friday.

Next 5 runs

These times are in your browser's local time zone. Cron itself uses the server's zone, which on most cloud hosts is UTC. If the difference matters here, see time zones & DST.

When to use this schedule

It runs hourly from 09:00 to 17:00, Monday to Friday, which comes to nine runs a day and 45 a week. This is the usual schedule for work that only matters while people are at their desks, such as processing a support tool's queue, syncing a CRM, or refreshing a dashboard that nobody opens overnight.

What to watch out for

The hour range is inclusive at both ends and covers the whole of the final hour. 9-17 therefore includes 17:00, and if you change the minute field to */15 the last run becomes 17:45 instead of 17:00. To stop at exactly 17:00, use 9-16 in the hour field and add a separate line for 0 17 * * 1-5. This schedule also has no notion of public holidays, so a job that must skip them needs a calendar check in the script.

The crontab line

0 9-17 * * 1-5 /usr/local/bin/your-job.sh >> /var/log/your-job.log 2>&1

Send the output to a log you will read. By default cron mails it, and on a host with no mail transport that mail is silently dropped. See the crontab guide for the surrounding syntax.

Related schedules

Variations on the business hours schedule
ExpressionSchedule
*/15 9-17 * * 1-5Every 15 min in business hours
0 9-17 * * MON-FRISame schedule, using names
0 8-18 * * 1-5A wider window

Build your own

If this page doesn't cover the schedule you need, compose it field by field in the visual builder, or paste an expression you already have into the explainer for a per-field breakdown. The examples library has sixty schedules in one place, and the guides cover crontab syntax, time zones, troubleshooting and production practices.