Run Mon Wed Fri Tasks at 10 AM | CronBase
0 10 * * 1,3,5 At ten o'clock in the morning on Mondays, Wednesdays, and Fridays.
This cron expression schedules a task to run at exactly 10:00 AM every Monday, Wednesday, and Friday. It is commonly used for recurring mid-week operational processes, automated reporting, data synchronization pipelines, and tri-weekly maintenance routines that need to execute during or just before standard business hours.
- Minute
- 0
- Hour
- 10
- Day of Month
- *
- Month
- *
- Day of Week
- 1,3,5
Next 5 Runs
- in 1d 13h
- in 3d 13h
- in 5d 13h
- in 8d 13h
- in 10d 13h
* Tools
Code & Implementations
#!/usr/bin/env bash
# Production deployment script to install the cron job safely
set -euo pipefail
CRON_SCHEDULE="0 10 * * 1,3,5"
JOB_COMMAND="/usr/local/bin/run-triweekly-sync.sh >> /var/log/cron_sync.log 2>&1"
CRON_LINE="${CRON_SCHEDULE} ${JOB_COMMAND}"
echo "Installing cron job for Monday, Wednesday, Friday at 10:00 AM..."
# Ensure we do not duplicate the cron job
(crontab -l 2>/dev/null | grep -Fv "${JOB_COMMAND}" ; echo "${CRON_LINE}") | crontab -
echo "Cron job successfully installed and verified." › Setup notes
Save this script as setup_cron.sh, make it executable with 'chmod +x setup_cron.sh', and run it with appropriate user privileges to update your crontab.
const cron = require('node-cron');
const { exec } = require('child_process');
// Schedule task to run at 10:00 AM on Mondays, Wednesdays, and Fridays
const schedule = '0 10 * * 1,3,5';
console.log(`Initializing cron runner with schedule: ${schedule}`);
const task = cron.schedule(schedule, () => {
const timestamp = new Date().toISOString();
console.log(`[${timestamp}] Starting scheduled tri-weekly data pipeline...`);
exec('/usr/local/bin/pipeline-trigger.sh', (error, stdout, stderr) => {
if (error) {
console.error(`[${timestamp}] Execution Error: ${error.message}`);
return;
}
if (stderr) {
console.warn(`[${timestamp}] Execution Warning: ${stderr}`);
}
console.log(`[${timestamp}] Execution Output: ${stdout}`);
});
}, {
scheduled: true,
timezone: "America/New_York"
}); › Setup notes
Install the node-cron package using 'npm install node-cron' and run this script using Node.js in a daemonized process manager like PM2.
import logging
from apscheduler.schedulers.blocking import BlockingScheduler
from datetime import datetime
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
def execute_triweekly_job():
logger.info("Tri-weekly job execution started.")
try:
# Place your production logic here
pass
except Exception as e:
logger.error(f"Job execution failed: {str(e)}", exc_info=True)
if __name__ == '__main__':
scheduler = BlockingScheduler()
# 1,3,5 corresponds to mon,wed,fri
scheduler.add_job(
execute_triweekly_job,
'cron',
day_of_week='mon,wed,fri',
hour=10,
minute=0,
timezone='UTC'
)
logger.info("Scheduler started for Monday, Wednesday, Friday at 10:00 UTC")
try:
scheduler.start()
except (KeyboardInterrupt, SystemExit):
logger.info("Scheduler stopped cleanly.") › Setup notes
Install APScheduler using 'pip install apscheduler' and run this script. Ensure your system time or target timezone matches the UTC setting.
package main
import (
"fmt"
"log"
"os"
"os/signal"
"syscall"
"time"
"github.com/robfig/cron/v3"
)
func main() {
// Use NewWithLocation to explicitly handle timezone considerations
nyc, err := time.LoadLocation("America/New_York")
if err != nil {
log.Fatalf("Failed to load timezone: %v", err)
}
c := cron.New(cron.WithLocation(nyc))
// Standard cron dialect for Mon, Wed, Fri at 10:00 AM
_, err = c.AddFunc("0 10 * * 1,3,5", func() {
fmt.Printf("[%s] Running scheduled tri-weekly sync\n", time.Now().Format(time.RFC3339))
// Execute production workload here
})
if err != nil {
log.Fatalf("Failed to schedule cron job: %v", err)
}
c.Start()
log.Println("Cron engine started for Mon, Wed, Fri at 10:00 AM EST/EDT")
// Handle graceful shutdown
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
<-sigChan
log.Println("Shutting down cron scheduler...")
c.Stop()
} › Setup notes
Initialize a Go module, run 'go get github.com/robfig/cron/v3', and execute this code in your main daemon loop.
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.time.Instant;
@Component
public class TriWeeklyScheduler {
private static final Logger logger = LoggerFactory.getLogger(TriWeeklyScheduler.class);
// Standard cron pattern: second, minute, hour, day of month, month, day(s) of week
// Spring's cron format accepts 6 fields. We specify 0 for seconds.
@Scheduled(cron = "0 0 10 * * MON,WED,FRI", zone = "America/New_York")
public void executeTask() {
logger.info("Triggering scheduled tri-weekly sync at: {}", Instant.now());
try {
// Production business logic goes here
runDataPipeline();
} catch (Exception e) {
logger.error("Error during scheduled job execution", e);
}
}
private void runDataPipeline() {
// Actual implementation logic
}
} › Setup notes
Ensure your Spring Boot application has '@EnableScheduling' declared on a configuration class, and place this component inside your component scan path.
apiVersion: batch/v1
kind: CronJob
metadata:
name: triweekly-data-sync
namespace: production
spec:
schedule: "0 10 * * 1,3,5"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 5
jobTemplate:
spec:
template:
spec:
containers:
- name: sync-worker
image: registry.example.com/data-sync:v1.2.0
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: "1000m"
memory: "2Gi"
requests:
cpu: "500m"
memory: "1Gi"
restartPolicy: OnFailure › Setup notes
Apply this manifest to your Kubernetes cluster using 'kubectl apply -f cronjob.yaml'. Ensure your cluster timezone or kube-controller-manager is configured appropriately.
Last verified:
Keep this cron job monitored 24/7
UptimeRobot alerts you the moment a scheduled job stops responding. Free plan monitors up to 50 endpoints — no credit card required.
Platform Equivalents
AWS EventBridge
Standard cron expressions often need conversion for AWS EventBridge schedules.
cron(0 10 ? * 1,3,5 *) Systemd Timer
OnCalendarMon,Wed,Fri *-*-* 10:00:00
[Unit]
Description=Timer for cron expression: 0 10 * * 1,3,5
[Timer]
OnCalendar=Mon,Wed,Fri *-*-* 10:00:00
Persistent=true
[Install]
WantedBy=timers.target
Last verified:
Frequently Asked Questions
Does this schedule shift during Daylight Saving Time (DST) changes?
Yes, if your cron daemon or host system is configured to run in a local timezone that observes DST (like America/New_York or Europe/London). If your host runs on UTC, the execution will remain strictly aligned to 10:00 AM UTC, meaning its local time equivalent will shift twice a year.
How can I prevent jobs from overlapping if a run takes longer than 24 hours?
Since this schedule runs every 48 hours between weekdays (Mon-Wed-Fri), any execution taking over 48 hours will overlap with the next run. Use locking mechanisms like Kubernetes 'concurrencyPolicy: Forbid', flock in Bash, or Redis-based distributed locks in application code to prevent concurrent execution.
What is the best way to test this cron schedule locally?
You can test the execution logic by temporarily changing the cron expression to run every minute (e.g., '* * * * *') in a development environment, or by calling the underlying script/handler manually. Tools like crontab generator websites can also verify your syntax before deployment.
Why does my Monday run take significantly longer than the Wednesday run?
The Monday run occurs after a 72-hour weekend gap, whereas Wednesday and Friday runs occur after 48-hour gaps. Monday runs typically have to process a larger volume of accumulated queue messages, transaction records, or user signups that occurred over the weekend.
How do I modify this schedule to run on weekends instead?
To run only on weekends at 10:00 AM, change the last field of the cron expression from '1,3,5' (Monday, Wednesday, Friday) to '6,0' or '6,7' depending on your cron environment's Sunday representation (e.g., '0 10 * * 6,0').
* Explore
Related expressions you might need
Last verified: