Run Morning Jobs Every Weekday at 6 AM | CronBase

cron expression Standard
$ 0 6 * * 1-5

Every morning from Monday through Friday at six o'clock.

This cron expression schedules a task to run automatically at 6:00 AM every weekday, from Monday through Friday. It is commonly used in enterprise environments to trigger morning database warmups, generate daily business intelligence reports, and kick off early-morning system checks before the standard business day begins.

Minute
0
Hour
6
Day of Month
*
Month
*
Day of Week
1-5

Next 5 Runs

  • in 2d 20h
  • in 3d 20h
  • in 4d 20h
  • in 5d 20h
  • in 6d 20h

* Tools

Code & Implementations

nodejs
const cron = require('node-cron');
const { exec } = require('child_process');

// Schedule task to run at 6:00 AM, Monday through Friday
cron.schedule('0 6 * * 1-5', () => {
    console.log(`[${new Date().toISOString()}] Starting morning weekday process...`);
    exec('/usr/local/bin/process-data.sh', (error, stdout, stderr) => {
        if (error) {
            console.error(`[ERROR] Task failed: ${error.message}`);
            return;
        }
        if (stderr) {
            console.warn(`[WARN] Task stderr: ${stderr}`);
        }
        console.log(`[SUCCESS] Task output: ${stdout}`);
    });
}, {
    scheduled: true,
    timezone: "UTC"
});
Setup notes

Install 'node-cron' via npm. Ensure your Node process runs continuously using a process manager like PM2 to guarantee the schedule is maintained.

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 6 ? * 1-5 *)

Systemd Timer

OnCalendarMon..Fri *-*-* 06:00:00

my-task.timer
[Unit]
Description=Timer for cron expression: 0 6 * * 1-5

[Timer]
OnCalendar=Mon..Fri *-*-* 06:00:00
Persistent=true

[Install]
WantedBy=timers.target

Frequently Asked Questions

How does daylight saving time affect this 6 AM schedule?

If your system timezone is set to a local zone that observes DST, the execution time will shift relative to UTC. In the spring transition, the job runs normally, but during autumn transitions, it might execute twice if the system does not handle duplicate hours. Running servers in UTC avoids this.

Why is the Monday run of this job taking significantly longer?

The Monday morning run is processing data accumulated over the entire weekend (Saturday and Sunday). Ensure your database queries, memory limits, and API integrations are optimized to handle three times the daily volume compared to mid-week runs.

Can I run this job on holidays that fall on weekdays?

Standard cron does not have built-in holiday awareness. The job will execute on weekday holidays (like Thanksgiving or Christmas) unless you implement custom logic inside your application code or wrapper script to check a holiday calendar and exit early.

How can I test this cron schedule without waiting until 6 AM?

You can temporarily modify the schedule in your development environment to run every minute (using `* * * * *`), or use a tool like `croniter` in Python or `go-cron` to simulate execution times. Alternatively, trigger the underlying script manually to verify its functionality.

What is the best way to monitor if this job failed to run?

Implement an external monitoring service using a 'dead man's snitch' or heartbeat pattern. Have your script send an HTTP request to the monitoring service at the end of its run. If the service does not receive the ping by 6:15 AM, it triggers an alert.

* Explore

Related expressions you might need

Was this helpful?

Last verified: