Run Every Wednesday at 10:00 AM | CronBase
0 10 * * 3 Every Wednesday morning at ten o'clock.
The `0 10 * * 3` cron expression schedules a job to execute automatically every Wednesday at exactly 10:00 AM. This mid-week, mid-morning slot is highly effective for running operational reports, triggering weekly team sync pipelines, or performing maintenance tasks that require active developer supervision during regular business hours.
- Minute
- 0
- Hour
- 10
- Day of Month
- *
- Month
- *
- Day of Week
- 3
Next 5 Runs
- in 3d 13h
- in 10d 13h
- in 17d 13h
- in 24d 13h
- in 31d 13h
* Tools
Code & Implementations
#!/usr/bin/env bash
# To install this system-wide, add the following line to your crontab:
# 0 10 * * 3 /usr/local/bin/wednesday-cleanup.sh
set -euo pipefail
LOG_FILE="/var/log/wednesday_cleanup.log"
exec 3>&1 1>>"${LOG_FILE}" 2>&1
echo "[$(date -u +'%Y-%m-%dT%H:%M:%SZ')] Wednesday morning cleanup job started."
# Perform a safe, non-blocking cleanup of temporary files
find /tmp/app-cache -type f -mtime +7 -delete || {
echo "[$(date -u +'%Y-%m-%dT%H:%M:%SZ')] Error: Cleanup failed." >&3
exit 1
}
echo "[$(date -u +'%Y-%m-%dT%H:%M:%SZ')] Wednesday cleanup completed successfully." › Setup notes
Save this script to /usr/local/bin/wednesday-cleanup.sh, make it executable with chmod +x, and register it in your crontab using 'crontab -e'.
const cron = require('node-cron');
const logger = require('pino')();
// Schedule to run every Wednesday at 10:00 AM UTC
cron.schedule('0 10 * * 3', async () => {
logger.info('Starting weekly Wednesday data sync...');
try {
await executeSyncPipeline();
logger.info('Weekly Wednesday data sync completed successfully.');
} catch (error) {
logger.error({ err: error }, 'Wednesday data sync failed.');
}
}, {
scheduled: true,
timezone: "UTC"
});
async function executeSyncPipeline() {
// Implementation of the mid-week sync logic
return Promise.resolve();
} › Setup notes
Install the dependency using 'npm install node-cron pino' and run this script as a persistent background daemon using PM2 or Docker.
import logging
import sys
from apscheduler.schedulers.blocking import BlockingScheduler
from apscheduler.triggers.cron import CronTrigger
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s [%(levelname)s] %(message)s',
handlers=[logging.StreamHandler(sys.stdout)]
)
logger = logging.getLogger(__name__)
def run_wednesday_job():
logger.info("Starting scheduled Wednesday 10:00 AM task...")
try:
# Add production business logic here
logger.info("Wednesday task completed successfully.")
except Exception as e:
logger.error(f"Wednesday task failed: {str(e)}", exc_info=True)
if __name__ == "__main__":
scheduler = BlockingScheduler()
# 0 10 * * 3 maps to day_of_week='wed', hour=10, minute=0
trigger = CronTrigger(day_of_week='wed', hour=10, minute=0, timezone='UTC')
scheduler.add_job(run_wednesday_job, trigger)
logger.info("Scheduler initiated. Waiting for Wednesday 10:00 AM UTC...")
try:
scheduler.start()
except (KeyboardInterrupt, SystemExit):
logger.info("Scheduler stopped cleanly.") › Setup notes
Install apscheduler via 'pip install apscheduler' and run the script. It uses a blocking scheduler, ideal for running inside a dedicated container.
package main
import (
"log"
"os"
"os/signal"
"syscall"
"time"
"github.com/robfig/cron/v3"
)
func main() {
logger := log.New(os.Stdout, "[WEDNESDAY-JOB] ", log.LstdFlags|log.Lshortfile)
// Use UTC location to avoid DST shifts
c := cron.New(cron.WithLocation(time.UTC))
_, err := c.AddFunc("0 10 * * 3", func() {
logger.Println("Executing weekly sync pipeline...")
if err := performSync(); err != nil {
logger.Printf("Pipeline failed: %v\n", err)
return
}
logger.Println("Pipeline execution completed successfully.")
})
if err != nil {
logger.Fatalf("Failed to initialize scheduler: %v", err)
}
c.Start()
logger.Println("Scheduler started. Running every Wednesday at 10:00 AM UTC.")
// Keep running until signal received
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
<-sigChan
logger.Println("Stopping scheduler...")
c.Stop()
}
func performSync() error {
// Simulating work
time.Sleep(2 * time.Second)
return nil
} › Setup notes
Initialize your module, run 'go get github.com/robfig/cron/v3' to fetch the library, then execute 'go run main.go'.
package com.example.scheduler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
public class MidWeekScheduler {
private static final Logger log = LoggerFactory.getLogger(MidWeekScheduler.class);
// Spring uses 6-field cron patterns: "second minute hour day-of-month month day-of-week"
// "0 0 10 * * WED" translates to 10:00:00 AM every Wednesday
@Scheduled(cron = "0 0 10 * * WED", zone = "UTC")
public void executeWednesdayTask() {
log.info("Starting scheduled Wednesday 10:00 AM execution...");
try {
runBusinessLogic();
log.info("Wednesday execution completed successfully.");
} catch (Exception e) {
log.error("Error occurred during Wednesday execution: ", e);
}
}
private void runBusinessLogic() {
// Application logic here
}
} › Setup notes
Ensure '@EnableScheduling' is added to your Spring Boot main application class. The job will run automatically on startup according to the cron schedule.
apiVersion: batch/v1
kind: CronJob
metadata:
name: wednesday-report-generator
namespace: default
spec:
schedule: "0 10 * * 3"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 2
jobTemplate:
spec:
template:
spec:
containers:
- name: generator
image: python:3.11-slim
command: ["python", "-c", "print('Generating Wednesday report...')"]
resources:
limits:
cpu: "500m"
memory: "512Mi"
requests:
cpu: "200m"
memory: "256Mi"
restartPolicy: OnFailure › Setup notes
Apply this manifest using 'kubectl apply -f cronjob.yaml'. It uses 'concurrencyPolicy: Forbid' to prevent overlapping runs if a job hangs.
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 10 ? * 3 *) Systemd Timer
OnCalendarWed *-*-* 10:00:00
[Unit]
Description=Timer for cron expression: 0 10 * * 3
[Timer]
OnCalendar=Wed *-*-* 10:00:00
Persistent=true
[Install]
WantedBy=timers.target
Last verified:
Frequently Asked Questions
How does daylight saving time affect this Wednesday 10:00 AM schedule?
If your system timezone is set to a region observing Daylight Saving Time (DST), the execution time will shift relative to UTC but remain at 10:00 AM local time. To avoid shifting execution windows in global environments, configure your system or scheduler to run on UTC.
Can I run this job on both Wednesday and Thursday at 10:00 AM?
Yes, you can modify the day-of-week field to include both days. Changing the expression to `0 10 * * 3,4` will trigger the execution at 10:00 AM on both Wednesdays and Thursdays.
What happens if the server is offline on Wednesday at 10:00 AM?
Standard system cron will skip the execution entirely. If you require the job to run immediately upon system recovery, you should use a tool like `anacron` or configure a catch-up policy in your container orchestrator.
Is 10:00 AM Wednesday safe for high-volume database maintenance?
Generally, no. 10:00 AM is typically a peak usage hour for business applications. Running heavy database queries or vacuum operations during this time can cause lock contention and latency spikes. Move heavy maintenance tasks to off-peak weekend hours instead.
How can I test this Wednesday cron schedule locally without waiting?
You can test the execution logic by temporarily changing the cron expression to run every minute (`* * * * *`) in a staging environment, or manually triggering the underlying script or Kubernetes Job out-of-band to verify its behavior.
* Explore
Related expressions you might need
Last verified: