Tools › Cron examples › every 15 minutes during business hours

Cron expression for every 15 minutes during business hours

The cron expression for every 15 minutes during business hours is:

*/15 9-17 * * 1-5

What it does

Runs every 15 minutes from 09:00 to 17:45 on weekdays. The hour range 9-17 includes the whole 17:00 hour.

Field by field

FieldValueMeaning
Minute*/15step */15
Hour9-17range 9-17
Day of month*every value
Month*every value
Day of week1-5range 1-5

Typical uses

Polling that only matters while people are at work.

Watch out for

To stop at exactly 17:00, use */15 9-16 * * 1-5 and add 0 17 * * 1-5 as a separate line.

Add it to your crontab

crontab -e, then add:

*/15 9-17 * * 1-5 /path/to/command >> /var/log/myjob.log 2>&1

Related schedules

every minuteevery 5 minutesevery 10 minutesevery 15 minutesevery 30 minutesevery hourevery 2 hoursevery day at midnightevery day at 3amevery weekday at 9amevery Mondayevery Sunday at midnighton weekendson the first day of every monthon the last day of the monthevery quartertwice a day
Copied to clipboard