Cron every 15 minutes during business hours
The cron expression for every 15 minutes during business hours is */15 9-17 * * 1-5. In words: every 15 minutes, between 09:00 and 17:59, Monday through Friday.
What each field means
| Field | Value | Meaning |
|---|---|---|
| Minute | */15 | every 15 minutes |
| Hour | 9-17 | 9am through 5pm |
| Day of month | * | any day of the month |
| Month | * | every month |
| Day of week | 1-5 | Monday through Friday |
Times are in the timezone of whatever runs the schedule: the server's local time for crontab, UTC for GitHub Actions.
Use it
In a crontab, with a FlatLyne ping after the job succeeds:
*/15 9-17 * * 1-5 /usr/local/bin/job.sh && curl -fsS -m 10 --retry 5 https://api.flatlyne.com/<ping-token>
In a Kubernetes CronJob:
apiVersion: batch/v1 kind: CronJob spec: schedule: "*/15 9-17 * * 1-5" timeZone: "Etc/UTC"
In a GitHub Actions workflow (always UTC):
on:
schedule:
- cron: "*/15 9-17 * * 1-5"Know when it doesn't run
Cron doesn't tell you when a job fails or never starts. Create a FlatLyne check with the schedule */15 9-17 * * 1-5, add the curl above to your job, and get an email, Slack message or PagerDuty incident when a ping is late. See how to monitor a cron job.
Related schedules
- Cron every minute * * * * *
- Cron every 2 minutes */2 * * * *
- Cron every 3 minutes */3 * * * *
- Cron every 4 minutes */4 * * * *
- Cron every 5 minutes */5 * * * *
- Cron every 10 minutes */10 * * * *
- Cron every 15 minutes */15 * * * *
- Cron every 20 minutes */20 * * * *
- Cron every 30 minutes */30 * * * *
Have a different expression? Paste it into the cron expression tool, or browse all examples.