Run Every Monday Morning at 6 AM | CronBase
0 6 * * 1 Every week on Monday morning at six o'clock
The `0 6 * * 1` cron expression schedules a task to run once a week on Monday mornings at exactly 6:00 AM. This cadence is highly effective for preparing business dashboards, triggering weekly email digests, clearing temporary caches, or initiating weekly system health checks before the standard business workday begins.
- Minute
- 0
- Hour
- 6
- Day of Month
- *
- Month
- *
- Day of Week
- 1
Next 5 Runs
- in 1d 9h
- in 8d 9h
- in 15d 9h
- in 22d 9h
- in 29d 9h
* Tools
Code & Implementations
#!/usr/bin/env bash
# Safely append the weekly maintenance cron job to the user's crontab
(crontab -l 2>/dev/null; echo "0 6 * * 1 /usr/local/bin/weekly-cleanup.sh >> /var/log/weekly-cleanup.log 2>&1") | crontab - › Setup notes
Run this script on your target Linux server to install the cron job. Ensure the destination script /usr/local/bin/weekly-cleanup.sh exists and is marked executable.
const cron = require('node-cron');
const logger = require('./logger');
// Schedule the job using standard cron syntax for Monday at 6:00 AM
cron.schedule('0 6 * * 1', async () => {
logger.info('Starting weekly system maintenance task...');
try {
// Business logic for weekly report generation or cache clear
await runWeeklyCleanup();
logger.info('Weekly maintenance completed successfully.');
} catch (error) {
logger.error('Weekly maintenance failed to execute:', error);
}
}, {
scheduled: true,
timezone: "UTC"
}); › Setup notes
Install node-cron using 'npm install node-cron'. This script configures the job to run in the UTC timezone to prevent daylight saving time discrepancies.
from apscheduler.schedulers.blocking import BlockingScheduler
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
def weekly_reporting_job():
logger.info("Executing weekly report generation...")
try:
# Place your application logic here
pass
except Exception as e:
logger.error(f"Failed to generate weekly reports: {e}")
scheduler = BlockingScheduler()
# day_of_week='mon' or 0 represents Monday
scheduler.add_job(weekly_reporting_job, 'cron', day_of_week='mon', hour=6, minute=0, timezone='UTC')
try:
scheduler.start()
except (KeyboardInterrupt, SystemExit):
pass › Setup notes
Install APScheduler using 'pip install apscheduler'. Run this script in a background process or daemon to ensure continuous scheduling execution.
package main
import (
"github.com/robfig/cron/v3"
"log"
"time"
)
func main() {
// Initialize scheduler using UTC to avoid DST issues
loc, _ := time.LoadLocation("UTC")
c := cron.New(cron.WithLocation(loc))
_, err := c.AddFunc("0 6 * * 1", func() {
log.Println("Starting weekly database indexing and validation...")
// Execute business logic functions here
})
if err != nil {
log.Fatalf("Error scheduling weekly cron job: %v", err)
}
c.Start()
select {} // Block main thread
} › Setup notes
Import robfig/cron/v3. This Go program sets up a persistent cron runner locked to the UTC timezone to trigger your weekly routines.
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Component
public class WeeklyMaintenanceScheduler {
private static final Logger logger = LoggerFactory.getLogger(WeeklyMaintenanceScheduler.class);
// Standard cron expression for Monday at 6:00 AM
@Scheduled(cron = "0 6 * * 1", zone = "UTC")
public void runWeeklyTask() {
logger.info("Starting scheduled weekly database optimization...");
try {
// Implement cleanup, reports, or sync logic here
} catch (Exception e) {
logger.error("Error occurred during weekly optimization job", e);
}
}
} › Setup notes
Ensure @EnableScheduling is declared on your main Spring Boot configuration class. Define the execution zone to ensure consistent run times.
apiVersion: batch/v1
kind: CronJob
metadata:
name: weekly-sync-job
namespace: production
spec:
schedule: "0 6 * * 1"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 5
jobTemplate:
spec:
template:
spec:
containers:
- name: sync-worker
image: registry.example.com/sync-worker:v1.2.0
env:
- name: LOG_LEVEL
value: "info"
restartPolicy: OnFailure › Setup notes
Apply this manifest to your cluster using 'kubectl apply -f'. The 'Forbid' concurrency policy ensures that if a run hangs, new instances won't start.
Last verified:
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.
cron(0 6 ? * 1 *) Systemd Timer
OnCalendarMon *-*-* 06:00:00
[Unit]
Description=Timer for cron expression: 0 6 * * 1
[Timer]
OnCalendar=Mon *-*-* 06:00:00
Persistent=true
[Install]
WantedBy=timers.target
Last verified:
Frequently Asked Questions
How does daylight saving time affect a Monday 6 AM schedule?
If your system runs on local time, the job may execute twice or be skipped entirely during spring/autumn clock shifts. To guarantee consistency, configure your cron daemon or application scheduler to run on Coordinated Universal Time (UTC).
What happens if a Monday is a public holiday?
Standard cron does not natively support holiday calendars. If your Monday tasks should not run on holidays, you must implement a check at the beginning of your execution script to verify the business calendar and exit early if necessary.
How can I prevent duplicate executions if a job runs longer than expected?
Since this job runs weekly, a runtime exceeding 7 days is rare but possible if a process hangs. Implement flock/lockfile mechanisms in Bash, use Redis-based distributed locks (like Redlock) in microservices, or set the Kubernetes concurrencyPolicy to Forbid.
Can I run this on a different day of the week instead?
Yes, you can change the final field of the cron expression. For example, replacing the '1' with '2' shifts the execution to Tuesday at 6:00 AM, while '5' shifts it to Friday at 6:00 AM.
How should I monitor this weekly job to ensure it actually ran?
Because weekly jobs run infrequently, silent failures can go unnoticed for a long time. Use active push-based monitoring like Healthchecks.io or Dead Man's Snitch, which alert you if a ping is not received by 6:05 AM every Monday.
* Explore
Related expressions you might need
Last verified: