All Cron Schedules

Cron Weekdays at Midnight

Run a cron job Monday through Friday at midnight:

0 0 * * 1-5

Understanding the Expression

The cron expression 0 0 * * 1-5 breaks down as follows:

Field Value Meaning
Minute0At minute 0
Hour0At midnight (00:00)
Day of month*Every day of the month
Month*Every month
Day of week1-5Monday through Friday

Example Usage

Basic crontab entry

0 0 * * 1-5 /path/to/your/script.sh

With output logging

0 0 * * 1-5 /path/to/script.sh >> /var/log/script.log 2>&1

With monitoring

0 0 * * 1-5 /path/to/script.sh && curl -fsS https://cronsignal.io/ping/YOUR_CHECK_ID

Common Use Cases for Weekdays at Midnight

  • Business hour jobs: Run tasks during working hours only
  • Off-peak processing: Heavy tasks during low-traffic periods
  • Scheduled notifications: Send alerts during appropriate hours
  • Workday automation: Automate business processes on weekdays

Platform Equivalents

The same schedule expressed across common platforms and schedulers:

Platform Syntax
Linux crontab0 0 * * 1-5
GitHub Actions- cron: '0 0 * * 1-5'
systemd timerOnCalendar=Mon..Fri *-*-* 00:00:00
Kubernetes CronJobschedule: "0 0 * * 1-5"
AWS EventBridgecron(0 0 ? * MON-FRI *)

Timezone Considerations

Midnight UTC on weekdays is Sunday 7-8 PM EST/CDT — still the weekend locally. For true Monday-midnight in a US timezone, add the UTC offset to the hour field.

Common Mistakes

  • Timezone boundary: "Weekday midnight" in UTC is Sunday evening in the Americas. Confirm whether you want midnight UTC or midnight local time.
  • Day 0 vs 7 for Sunday: Use 1-5 universally. Avoid 0-4 as some implementations treat 0 differently from 7.
  • GitHub Actions: Schedules run in UTC. 0 0 * * 1-5 fires Mon-Fri at 00:00 UTC, which is Sun-Thu evening in the US.

Monitor this schedule

Get alerted when your cron job doesn't run.

Sign up with Google
or

Explore More