Run a cron job every hour on weekdays with 0 * * * 1-5.
The cron expression 0 * * * 1-5 runs at minute 0 of every hour, but only on Monday through Friday (1-5 in the day-of-week field). This produces 120 executions per week (0 past each of 24 hours × 5 weekdays). The minute field (0) controls the offset within each hour, and the weekday restriction prevents weekend executions. Common use cases include monitoring production systems during work hours (though it runs all 24 hours of each weekday), periodic log checks, intraday reporting, and scheduled data synchronization that should pause on weekends. If you want to limit execution to business hours only (9 AM to 5 PM), combine the weekday field with an hour range: 0 9-17 * * 1-5. This runs at minute 0 of each hour from 9 AM to 5 PM, Monday through Friday — 9 executions per weekday instead of 24. For Quartz Scheduler, use 0 * ? * MON-FRI (7 fields with seconds). For AWS EventBridge, use cron(0 * ? * MON-FRI *). For Kubernetes CronJob, use schedule: "0 * * * 1-5".
The expression 0 * * * 1-5 means: at minute 0, hour *, day-of-month *, month *, day-of-week 1-5. 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: 0 * * * 1-5 /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: 0 * * * 1-5. AWS EventBridge: cron(0 * ? * 1-5 *). Kubernetes CronJob: schedule: "0 * * * 1-5" (standard 5-field format). Each platform has slight syntax differences — use our dialect switcher above to get the exact expression.
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: 0 * * * 1-5 /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 0 * * * 1-5 has different syntax on various scheduling platforms. Here is the equivalent expression for each:
| Platform | Expression |
|---|---|
| Unix / Linux crontab | 0 * * * 1-5 |
| Quartz Scheduler (Java) | 0 * ? * 1-5 |
| AWS EventBridge | cron(0 * ? * 1-5 *) |
| Kubernetes CronJob | 0 * * * 1-5 |
| Vercel Cron | 0 * * * 1-5 |
| GitHub Actions | 0 * * * 1-5 (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: