Cron expression

Cron every 30 minutes in business hours

The cron expression */30 9-17 * * 1-5 runs every 30 minutes during hours 9 through 17, on Monday through Friday. Below: what each field means, its next runs in your time zone, and how to get an alert if it stops.

toolsCron expression
*/30Minute
9-17Hour
*Day of month
*Month
1-5Day of week

Every 30 minutes during hours 9 through 17, on Monday through Friday.

What does */30 9-17 * * 1-5 mean?

Every 30 minutes during hours 9 through 17, on Monday through Friday.

FieldWrittenMeans
Minute*/30every 30 from 0: 0 and 30
Hour9-179 through 17
Day of month*every day of month
Month*every month
Day of week1-5Monday through Friday

How often does it run?

On a day it runs, it runs 18 times. It runs on 261 days of 2027, 4,698 runs in all. The gap between runs is not constant: it varies from 30 minutes to 2 days 15 hours.

Runs on a day it runs
18
Days it runs in 2027
261
Runs in 2027
4,698
Shortest gap
30 minutes

When is this schedule useful?

Half-hourly office-hours jobs: syncing a CRM, refreshing a status board, or sending batched notifications.

What should you watch out for?

The last run is at 17:30, not 17:00, because the 17 in the hour field covers the whole hour.

What happens when the clocks change?

On Sunday 14 March 2027, clocks in America/New_York jump from 02:00 to 03:00. This schedule does not run that day, so the change does not touch it.

On Sunday 1 November 2026, clocks in America/New_York fall back from 02:00 to 01:00, so the hour from 01:00 happens twice. This schedule does not run that day, so the change does not touch it.

A server that keeps its clock on UTC never sees either change. The next run calculator previews any zone.

How do you write it for other schedulers?

SchedulerExpressionNotes
Kubernetes CronJob*/30 9-17 * * 1-5 Exact
GitHub Actions*/30 9-17 * * 1-5 Exact
Vercel Cron*/30 9-17 * * 1-5Vercel runs cron jobs in UTC; write the hours in UTC.
Quartz0 */30 9-17 ? * MON-FRI Exact
Spring @Scheduled0 */30 9-17 * * MON-FRI Exact
AWS EventBridgecron(*/30 9-17 ? * MON-FRI *) Exact
systemd OnCalendarMon..Fri *-*-* 09..17:00/30:00 Exact

How do you get an alert when it stops running?

Create a cron check with the schedule */30 9-17 * * 1-5 and 5 minutes of grace, then ping it at the end of the job. If a run does not report in by the end of the grace time, CronMissed sends an alert.

crontab -e
*/30 9-17 * * 1-5 /usr/local/bin/job.sh && curl -fsS --max-time 10 --retry 5 --retry-connrefused -o /dev/null "https://ping.cronmissed.com/5f0c1b2e-7a3d-4c8e-9b61-2d4f8a7e3c10"

The snippet builder writes the same ping for systemd, GitHub Actions, Vercel, Kubernetes and backup scripts.

Questions and answers

What does */30 9-17 * * 1-5 mean in cron?
Every 30 minutes during hours 9 through 17, on Monday through Friday.
How often does */30 9-17 * * 1-5 run?
On a day it runs, it runs 18 times. It runs on 261 days of 2027, 4,698 runs in all. The gap between runs is not constant: it varies from 30 minutes to 2 days 15 hours.
How do I get an alert when this job stops running?
Create a cron check with the schedule */30 9-17 * * 1-5 and 5 minutes of grace, then add the ping to the end of the job so it requests the check URL after each successful run. If a run does not report in by the end of the grace time, CronMissed alerts you by email, Slack, Discord, Telegram, ntfy or webhook.

Know the first time this schedule misses a run

CronMissed expects a ping at every run of */30 9-17 * * 1-5. When one is late or reports a failure, you get an alert by email, Slack, Discord, Telegram, ntfy or webhook.