Cron Expression for Weekdays During Business Hours

Schedule a cron job every 30 minutes from 9 AM to 5 PM, Monday to Friday, with */30 9-17 * * 1-5. See how ranges and steps combine.

Part of the free Cron Expression Generator. Runs in your browser — nothing is uploaded.

Cron Expression for Weekdays During Business Hours

Ranges and steps can be combined: 9-17 limits the hours and 1-5 limits the days. This is the usual pattern for monitoring, sync and notification jobs that should stay quiet at night and on weekends.

Worked example: Every 30 minutes, 9 to 17, Monday to Friday

Cron expression

*/30 9-17 * * 1-5

In plain English

Every 30 minutes, between 09:00 AM and 05:59 PM, Monday through Friday

Practical tip

The hour range 9-17 includes 17:00, so the last run is at 17:30 with this expression. Use 9-16 if you want to stop before 5 PM.

How to use this Cron Generator

  1. 1Use the live tool above — it runs entirely in your browser and never uploads your data.
  2. 2Paste the sample from the worked example, or use your own input.
  3. 3Copy the result, then adapt the same steps in your editor, script, or pipeline.

Cron Expression for Weekdays During Business Hours FAQs

How do I exclude weekends in cron?

Use 1-5 in the day-of-week field to run Monday to Friday only.

Does 9-17 include 5 PM?

Yes, ranges are inclusive. Runs happen throughout the 17:00 hour, up to 17:59 depending on the minute field.

More Cron Generator pages

Open the full Cron Generator tool →