/

Cron: Every Weeknight

0 18 * * 1-5 fires at 6 PM, Monday through Friday — a 'weeknight' schedule that explicitly skips weekends. It's a natural fit for end-of-workday automation: nightly builds that shouldn't run on weekends, evening digest emails for a work context, or maintenance windows tied to when an office actually empties out.

0 18 * * 1-5

Examples & Variations

0 18 * * 1-5

6 PM, Monday–Friday

Try it

0 22 * * 1-5

10 PM, Monday–Friday (later evening)

Try it

0 19-23 * * 1-5

Every hour, 7 PM–11 PM, weeknights

Try it

Common Mistakes

  • Confusing 'every weeknight' with 'every weekday' — weeknight implies evening hours specifically, not just Monday–Friday at any time; the hour field still needs to reflect an evening time.
  • Assuming weeknight automation should skip weekends because 'nobody's working' — verify this is actually true for your system; some workloads (consumer apps, global teams) don't follow a Monday–Friday office rhythm at all.
  • Scheduling something at exactly 6 PM without accounting for people who are still finishing up — a slightly later time (7–8 PM) often avoids interrupting anyone still active.

Best Practices

  • Good fit for nightly builds, weeknight-only reports, or maintenance windows explicitly tied to an office-hours business rhythm.
  • If the exact hour matters for avoiding active users, err later in the evening (9–11 PM) rather than right at typical office close time.
  • Document why weekends are excluded — a future engineer debugging a 'missing Saturday run' should be able to see it's intentional, not a bug.

Frequently Asked Questions

What's the difference between 'every weeknight' and 'every weekday'?
Every weekday (0 0 * * 1-5, for example) can fire at any hour, including morning. Every weeknight specifically implies an evening hour — the day-of-week range (1-5) is the same, but the hour field should reflect evening, not just any weekday time.
Does 0 18 * * 1-5 run on public holidays that fall on a weekday?
Yes — cron has no concept of holidays, only day-of-week. A weekday holiday still counts as a weekday and the job will still fire unless your script itself checks a holiday calendar.
How do I run something every hour throughout weeknight evenings?
Combine an hour range with the weekday restriction: 0 19-23 * * 1-5 fires every hour from 7 PM to 11 PM, Monday through Friday.