Run a cron every 30 minutes from 8 AM to 5 PM with */30 8-17 * * *.
The cron expression */30 8-17 * * * combines three cron features: a step operator (*/30) in the minute field for every-30-minute intervals, a range (8-17) in the hour field for hours 8 AM through 5 PM, and wildcards for all days. It produces approximately 20 executions per day daily. This composite schedule is useful for: high-frequency monitoring during peak hours, customer-facing dashboard refreshes during business times, API rate limit management during high-traffic periods, and batch processing that should only run when the system is under active use. For Quartz Scheduler, use 0 */30 8-17 ? * *. For AWS EventBridge, use cron(0/30 8-17 ? * * *). You can adjust the step value for different frequencies: */5 for every 5 minutes, */15 for quarter-hourly, */30 for half-hourly. The hour range controls the active window.
The expression */30 8-17 * * * means: at minute */30, hour 8-17, day-of-month *, month *, day-of-week *. Each field in the cron expression controls a different time component: minute, hour, day of month, month, and day of week.
Run crontab -e in your terminal to open your crontab editor. Add a new line: */30 8-17 * * * /path/to/your/script.sh. Save and exit. Verify with crontab -l. Make sure your script is executable (chmod +x script.sh) and uses full paths for all commands.
Quartz Scheduler: */30 8-17 * * ?. AWS EventBridge: cron(*/30 8-17 ? * * *). Kubernetes CronJob: schedule: "*/30 8-17 * * *" (standard 5-field format). Each platform has slight syntax differences — use our dialect switcher above to get the exact expression.
Not directly in standard cron. */N applies to the full range (0-59 for minutes, 0-23 for hours). For "every 10 minutes from 9:15 to 5:45," use 15-45/10 9-17 * * * — this combines a starting range with a step. Standard cron supports this in some implementations but not all.
Common pitfalls: (1) Cron uses a minimal PATH — always use full paths to commands and scripts. (2) Percent signs (%) must be escaped with backslash in crontab. (3) Cron runs in the system timezone — set CRON_TZ=UTC at the top of your crontab for consistent UTC scheduling. (4) Redirect output to prevent email spam: */30 8-17 * * * /path/command >> /var/log/myjob.log 2>&1. (5) Test your cron expression with crontab.guru or our validator above before deploying.
The cron expression */30 8-17 * * * has different syntax on various scheduling platforms. Here is the equivalent expression for each:
| Platform | Expression |
|---|---|
| Unix / Linux crontab | */30 8-17 * * * |
| Quartz Scheduler (Java) | */30 8-17 * * ? |
| AWS EventBridge | cron(*/30 8-17 ? * * *) |
| Kubernetes CronJob | */30 8-17 * * * |
| Vercel Cron | */30 8-17 * * * |
| GitHub Actions | */30 8-17 * * * (UTC) |
Key differences across platforms: Quartz uses 7 fields starting with seconds and supports L (last) and W (weekday) modifiers. AWS EventBridge requires a 6th year field and uses ? instead of * in day fields when the other day field is specified. Kubernetes uses standard 5-field Unix cron. Vercel Cron uses the same format but schedules are defined in vercel.json. GitHub Actions uses standard cron but runs in UTC timezone only, so adjust the hour field for your local timezone offset.
Follow these tips when setting up cron jobs in production: