Run Jobs at Start, Midday, and End of Weekdays | CronBase

cron expression Standard
$ 0 8,12,17 * * 1-5

Every Monday through Friday at morning, noon, and late afternoon.

This cron expression executes a task three times daily at 8:00 AM, 12:00 PM, and 5:00 PM, exclusively on weekdays (Monday through Friday). It is ideal for orchestrating business-day workflows, such as syncing transactional ledgers, sending daily status digests, or initiating system health checks during standard corporate operating hours.

Minute
0
Hour
8,12,17
Day of Month
*
Month
*
Day of Week
1-5
How it works

Next 5 Runs

  • in 1d 11h
  • in 1d 15h
  • in 1d 20h
  • in 2d 11h
  • in 2d 15h

* Tools

Code & Implementations

Bash
#!/usr/bin/env bash
# Production-ready crontab entry and execution script
# Cron expression: 0 8,12,17 * * 1-5
# Executes at 08:00, 12:00, and 17:00, Monday through Friday

set -euo pipefail

log_message() {
    echo "$(date -u '+%Y-%m-%d %H:%M:%S UTC') - [INFO] - $1"
}

log_message "Starting business checkpoint task..."

# Simulate workload execution with error handling
if ! /usr/local/bin/sync-business-data.sh; then
    log_message "ERROR: Synchronization task failed." >&2
    exit 1
fi

log_message "Business checkpoint completed successfully."
Setup notes

Save this script to /usr/local/bin/run-checkpoint.sh, make it executable with chmod +x, and add the cron expression 0 8,12,17 * * 1-5 /usr/local/bin/run-checkpoint.sh to your system crontab via crontab -e.

Last verified:

Partner BetterStack

Monitor this schedule in production

Get alerted the moment this cron job fails, is late, or doesn't run. BetterStack tracks execution, duration, and output — no infrastructure required.

Platform Equivalents

AWS EventBridge

Standard cron expressions often need conversion for AWS EventBridge schedules.

EventBridge Rule
cron(0 8,12,17 ? * 1-5 *)

Systemd Timer

OnCalendarMon..Fri *-*-* 08,12,17:00:00

my-task.timer
[Unit]
Description=Timer for cron expression: 0 8,12,17 * * 1-5

[Timer]
OnCalendar=Mon..Fri *-*-* 08,12,17:00:00
Persistent=true

[Install]
WantedBy=timers.target

Last verified:

Frequently Asked Questions

How does Daylight Saving Time affect this weekday schedule?

Since this schedule runs at specific local business hours (8, 12, 17), running your system on UTC will cause the local execution time to shift twice a year. To prevent this, configure your scheduler or cron daemon to respect a specific local timezone, or use a timezone-aware scheduler wrapper.

What happens if a job runs longer than 4 hours and overlaps?

If your midday execution (12:00 PM) takes longer than 5 hours, it will overlap with the 5:00 PM run. Use concurrency locking (e.g., flock in Bash, Redlock in Redis, or `concurrencyPolicy: Forbid` in Kubernetes) to prevent simultaneous instances from corrupting data.

Can I configure this to exclude specific corporate holidays?

Standard cron cannot parse holidays natively. To achieve this, execute the job on the schedule, but implement an initial guard clause in your application code that checks a holiday API or database table and exits early if the current date is a holiday.

Is it possible to shift the 5:00 PM run to 5:30 PM using standard cron?

No, standard cron applies the minute field (0) to all specified hours (8, 12, 17). To run at 8:00 AM, 12:00 PM, and 5:30 PM, you must define two separate cron entries: `0 8,12 * * 1-5` and `30 17 * * 1-5`.

How can I monitor failures specifically for these three daily runs?

Integrate a monitoring heartbeat tool (like Healthchecks.io or Opsgenie) with a grace period of 10 minutes. Configure your script to ping the check-in URL upon successful completion, alerting your on-call team if a run is missed.

* Explore

Related expressions you might need

Last verified:

Was this helpful?