crontool
Paste a schedule, read it in English, see the next runs.

Cron: Run at 9am and 5pm, Monday to Friday

To run a cron job at the start and end of the workday on weekdays only, use 0 9,17 * * 1-5. The hour list 9,17 fires at 09:00 and 17:00 (5 PM), and 1-5 restricts it to Monday through Friday.

The expression

0 9,17 * * 1-5 runs at 9am and 5pm on weekdays. Copy it straight into your crontab with crontab -e.

Two runs a day, weekdays only

0 9,17 * * 1-5 combines a comma hour list with a weekday range. It fires at 09:00 and 17:00 Monday-Friday and never on Saturday or Sunday.

Why 1-5 means Monday to Friday

The fifth field is day-of-week: 0 (or 7) is Sunday, 1 is Monday, up to 6 Saturday. The range 1-5 is Monday through Friday, so the job skips weekends automatically.

FAQ

What is the cron expression to run at 9am and 5pm on weekdays?

0 9,17 * * 1-5 — read it field by field: minute, hour, day-of-month, month, day-of-week.

How do I limit a cron job to Monday-Friday?

Set the fifth field (day-of-week) to 1-5. 0 and 7 are Sunday, 6 is Saturday, so 1-5 is Monday through Friday and weekends are skipped.

Does cron count hours in 24-hour time?

Yes. The hour field is 0-23, where 0 is midnight, 12 is noon and 17 is 5 PM. There is no AM/PM in cron.