Cron Expression for Business Hours (Weekdays)
The expression is 0 9-17 * * 1-5 — it runs at the top of every hour from 9am to 5pm, Monday through Friday. Paste it above to preview the runs.
The expression
0 9-17 * * 1-5 runs a job at minute 0 of every hour from 09:00 to 17:00, Monday through Friday — nine runs per weekday, none on the weekend.
Field by field
0 fixes the minute to the top of the hour. 9-17 is the hour range (inclusive) covering 9am through 5pm. Day-of-month and month stay *. 1-5 is Monday through Friday.
Adjusting the window
For 9am to 6pm use 0 9-18 * * 1-5. To run every 30 minutes inside business hours: */30 9-17 * * 1-5. To stop exactly at 5pm (not run at 17:00) use 0 9-16 * * 1-5.
Gotcha
9-17 includes the 17:00 run. If "business hours" means the last run is 4pm, use 9-16.
FAQ
What cron runs every hour during business hours?
0 9-17 * * 1-5 runs at the top of each hour from 9am to 5pm, Monday to Friday.
How do I run every 30 minutes in business hours?
Use */30 9-17 * * 1-5 for runs at :00 and :30 from 9am to 5pm on weekdays.
Does 9-17 include 5pm?
Yes, the range is inclusive, so a run fires at 17:00. Use 9-16 if you want the last run at 4pm.