Run Daily Production Jobs at 1:00 PM | CronBase
0 13 * * * Every day in the afternoon at one o'clock.
The `0 13 * * *` cron expression schedules a task to run daily at exactly 1:00 PM (13:00) according to the system's local timezone configuration. This afternoon cadence is ideal for mid-day reporting, synchronization tasks, secondary backups, or sending daily transactional digests to users.
- Minute
- 0
- Hour
- 13
- Day of Month
- *
- Month
- *
- Day of Week
- *
Next 5 Runs
- in 3h 2m
- in 1d 3h
- in 2d 3h
- in 3d 3h
- in 4d 3h
* Tools
Code & Implementations
const cron = require('node-cron');
const logger = require('./logger'); // Production logger
// Schedule task to run daily at 1:00 PM (13:00)
const task = cron.schedule('0 13 * * *', async () => {
logger.info('Starting daily mid-day synchronization task...');
try {
await performDailySync();
logger.info('Daily synchronization task completed successfully.');
} catch (error) {
logger.error('Failed to execute daily synchronization:', error);
}
}, {
scheduled: true,
timezone: "UTC" // Explicitly pin to UTC to avoid daylight saving time shifts
});
async function performDailySync() {
// Place production database sync or API polling logic here
} › Setup notes
Install the node-cron package via npm install node-cron. Import this schedule block into your main application entry point to daemonize the daily routine.
#!/usr/bin/env bash
# Production-ready crontab deployment script for 1:00 PM daily job
set -euo pipefail
# Define the job to execute daily at 1:00 PM
CRON_ENTRY="0 13 * * * /usr/local/bin/daily-sync.sh >> /var/log/daily-sync.log 2>&1"
# Install cron job safely without destroying existing crontab entries
(crontab -l 2>/dev/null | grep -Fv "/usr/local/bin/daily-sync.sh"; echo "$CRON_ENTRY") | crontab -
echo "Successfully scheduled daily sync job at 1:00 PM" › Setup notes
Save this script as deploy-cron.sh, make it executable using chmod +x, and run it on your Linux target server to register the cron schedule safely.
from apscheduler.schedulers.blocking import BlockingScheduler
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('daily_cron')
def execute_daily_job():
logger.info("Starting daily maintenance job scheduled for 1:00 PM...")
try:
# Production logic goes here
pass
except Exception as e:
logger.error(f"Error during daily job execution: {str(e)}")
if __name__ == '__main__':
scheduler = BlockingScheduler(timezone="UTC")
# Run daily at 13:00 (1:00 PM)
scheduler.add_job(execute_daily_job, 'cron', hour=13, minute=0)
logger.info("Scheduler started. Job configured for daily execution at 13:00 UTC.")
try:
scheduler.start()
except (KeyboardInterrupt, SystemExit):
pass › Setup notes
Install apscheduler via pip install apscheduler. Run this script inside a persistent background process or Docker container.
package main
import (
"log"
"time"
"github.com/robfig/cron/v3"
)
func main() {
// Use UTC to ensure predictable daily execution intervals
loc, err := time.LoadLocation("UTC")
if err != nil {
log.Fatalf("Failed to load timezone: %v", err)
}
c := cron.New(cron.WithLocation(loc))
// Standard cron: 0 13 * * * (minute, hour, day, month, week)
_, err = c.AddFunc("0 13 * * *", func() {
log.Println("Daily 1:00 PM job execution triggered successfully.")
if err := runDailyTask(); err != nil {
log.Printf("Error executing daily task: %v", err)
}
})
if err != nil {
log.Fatalf("Error scheduling cron job: %v", err)
}
log.Println("Cron scheduler initialized for daily 13:00 UTC job...")
c.Start()
select {} // Keep application running
}
func runDailyTask() error {
// Production business logic goes here
return nil
} › Setup notes
Import github.com/robfig/cron/v3 in your Go module, run go mod tidy, and run the main entry point to initiate the persistent cron scheduler.
package com.example.cron;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
public class DailyTaskScheduler {
private static final Logger logger = LoggerFactory.getLogger(DailyTaskScheduler.class);
// Runs daily at 1:00 PM (13:00) in the specified timezone
@Scheduled(cron = "0 0 13 * * *", zone = "UTC")
public void runDailyMaintenance() {
logger.info("Initiating daily scheduled maintenance task at 13:00 UTC...");
try {
processDailyData();
logger.info("Daily maintenance completed successfully.");
} catch (Exception e) {
logger.error("Critical error during daily maintenance execution: ", e);
}
}
private void processDailyData() {
// Implement production business logic
}
} › Setup notes
Ensure @EnableScheduling is declared on your Spring Boot application's main configuration class for Spring to recognize and invoke this daily task.
apiVersion: batch/v1
kind: CronJob
metadata:
name: daily-sync-job
namespace: production
spec:
schedule: "0 13 * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 5
jobTemplate:
spec:
template:
spec:
containers:
- name: sync-worker
image: registry.example.com/production/sync-worker:v1.2.0
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: "500m"
memory: 512Mi
restartPolicy: OnFailure › Setup notes
Apply this configuration using kubectl apply -f daily-cronjob.yaml. This will spin up an isolated pod every day at 1:00 PM to execute the job safely.
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 13 * * ? *) Systemd Timer
OnCalendar*-*-* 13:00:00
[Unit]
Description=Timer for cron expression: 0 13 * * *
[Timer]
OnCalendar=*-*-* 13:00:00
Persistent=true
[Install]
WantedBy=timers.target
Frequently Asked Questions
What happens to the 1:00 PM run during daylight saving time changes?
If your system timezone is set to a local zone that observes DST, the job will execute at 1:00 PM local time, which means the absolute interval between runs will be 23 or 25 hours on transition days. To avoid this, configure your server and cron daemon to use UTC.
How can I prevent this mid-day job from impacting database performance?
To minimize production impact at 1:00 PM, direct all heavy read operations to a read-only database replica. You should also implement strict query limits, batch processing, and low-priority CPU scheduling (like nice/ionice in Linux) on the worker node.
Can I restrict this daily 1:00 PM schedule to run only on weekdays?
Yes, you can modify the day-of-week field (the fifth field) to restrict execution. Changing the expression to '0 13 * * 1-5' will execute the task at 1:00 PM Monday through Friday, skipping Saturday and Sunday entirely.
How should I handle overlapping executions if a job runs longer than 24 hours?
Implement a locking mechanism, such as flock in Bash, a Redis-based distributed lock, or set concurrencyPolicy: Forbid in Kubernetes. This ensures that if the previous day's 1:00 PM job is still running, the new instance will be skipped or queued.
What is the best way to monitor if this daily job failed to run?
Use a dead man's switch monitoring service (like Healthchecks.io or Opsgenie) that expects a ping every 24 hours at approximately 1:05 PM. If the ping is missed, it alerts your on-call team, ensuring you catch silent cron daemon failures.
* Explore
Related expressions you might need
Last verified: