ShareYourGroupShareYourGroupCron Helper

Cron expression for every hour during business hours

Every hour, on the hour, between 09:00 and 17:00, on weekdays (Monday to Friday).

Five fields for Linux, GitHub Actions and Kubernetes (minute hour day month weekday). Six or seven for Quartz. Nothing you type leaves your device.

What it means and when to use it

A range such as 9-17 in the hour field lists every hour from 9 to 17 inclusive. With minute 0 that is nine runs a day: 9:00, 10:00 and so on up to 17:00. Add 1-5 for the working days. This is the standard way to say "every hour during the working day" for status emails, ticket checks, or a polling job that is pointless at night.

Watch out for this

If you change minute 0 to */15, the range 9-17 still includes the whole of hour 17, so you get runs at 17:15, 17:30 and 17:45 as well. The hour range limits the hour of the day, not the final minute. To end exactly at 17:00 you need two lines (see the page on every 15 minutes). The range also contains no time zone: 9-17 means the server's clock.

What each field says

FieldWrittenMeans
Minute00
Hour9-179, 10, 11, 12, 13, 14, 15, 16, 17 (9 values)
Day of month*every day of the month
Month*every month
Day of week1-5Mon, Tue, Wed, Thu, Fri

An example of the next runs

If it were Friday 13 November 2026 at 10:20 UTC, the next six runs would be these. Times are shown in UTC and in India time (UTC+5:30).

UTCIndia time
Fri 13 Nov, 11:00Fri 13 Nov, 16:30
Fri 13 Nov, 12:00Fri 13 Nov, 17:30
Fri 13 Nov, 13:00Fri 13 Nov, 18:30
Fri 13 Nov, 14:00Fri 13 Nov, 19:30
Fri 13 Nov, 15:00Fri 13 Nov, 20:30
Fri 13 Nov, 16:00Fri 13 Nov, 21:30

The same schedule in other places

Quartz

Quartz has a seconds field in front, uses ? in one day field, and counts Sunday as 1:

0 0 9-17 ? * 2-6

GitHub Actions

Scheduled workflows run in UTC unless you add a time zone. In the workflow file:

on:
  schedule:
    - cron: '0 9-17 * * 1-5'

Kubernetes CronJob

In a CronJob manifest the schedule goes in spec.schedule. Without spec.timeZone, it is read in the time zone of the cluster's controller:

spec:
  schedule: "0 9-17 * * 1-5"
  timeZone: "Etc/UTC"

A crontab line to copy

The command is made up. Replace it with your own and use full paths:

0 9-17 * * 1-5 /home/me/bin/ticket-check.sh >> /home/me/tickets.log 2>&1

Questions

Is the range inclusive?

Yes, the manual says the specified range is inclusive: 8-11 means hours 8, 9, 10 and 11.

This is an independent guide and tool. It is not connected with crontab.guru, Quartz, GitHub, Kubernetes, Spring or the Linux projects named here. Product names belong to their owners.