Weekly: Sunday at 1:15 AM
15 1 * * 0 Runs every Sunday at 1:15 AM.
* In a Nutshell
The cron expression 15 1 * * 0 runs Runs every Sunday at 1:15 AM.. This schedule is ideal for weekly maintenance tasks that are not time-sensitive and can tolerate potential overlaps. Examples include running database integrity checks, generating weekly reports, or performing system backups during low-traffic hours.
* When to use this
Use 15 1 * * 0 when a recurring task needs to run Runs every Sunday at 1:15 AM.. This schedule is commonly associated with database backup and maintenance window and report generation and weekend schedules and weekly schedules workloads. It uses Standard (5-Field POSIX) syntax, supported by Unix cron daemons, cloud schedulers such as AWS EventBridge, and container orchestration platforms such as Kubernetes CronJob.
CronBase parses 15 1 * * 0 using a dialect-aware rules engine that identifies the Standard (5-Field POSIX) format, validates field structure against the Standard (5-Field POSIX) specification, and produces the translation above. Next run times are calculated by forward-scanning from the current UTC clock. Learn how CronBase works.
Platform Implementations
Bash
Add the line '15 1 * * 0 /path/to/your/script.sh' to your crontab using the 'crontab -e' command.
0 15 1 * * 0 /path/to/your/script.sh Last verified:
Nodejs
Install the 'cron' package (npm install cron). Then, run the provided Node.js script. Ensure the timezone is set correctly.
const cron = require('cron');
new cron.CronJob('15 1 * * 0', function() {
console.log('Running weekly task on Sunday at 1:15 AM');
// Your task code here
}, null, true, 'America/Los_Angeles'); Last verified:
Python
Install the 'python-crontab' library (pip install python-crontab). Run this Python script to add the cron job to your user's crontab.
from crontab import CronTab
cron = CronTab(user=True)
job = cron.new(command='/usr/bin/python /path/to/your/script.py', comment='Weekly Sunday Task')
job.setall('15 1 * * 0')
cron.write() Last verified:
Golang
Install the cron library (go get github.com/robfig/cron/v3). Compile and run this Go program. The task will run on the schedule defined.
package main
import (
"fmt"
"github.com/robfig/cron/v3"
)
func main() {
c := cron.New()
c.AddFunc("0 15 1 * * 0", func() {
fmt.Println("Running weekly task on Sunday at 1:15 AM")
// Your task code here
})
c.Start()
// Keep the program running
select {}
} Last verified:
Java
Ensure you have the Quartz scheduler library added to your project. Compile and run this Java code. Replace MyTask.class with your actual job implementation.
import org.quartz.CronScheduleBuilder;
import org.quartz.CronTrigger;
import org.quartz.JobBuilder;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.TriggerBuilder;
import org.quartz.impl.StdSchedulerFactory;
public class WeeklyJob {
public static void main(String[] args) {
try {
Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler();
scheduler.start();
JobDetail job = JobBuilder.newJob(MyTask.class)
.withIdentity("weeklyJob", "group1")
.build();
CronTrigger trigger = TriggerBuilder.newTrigger()
.withIdentity("trigger1", "group1")
.withSchedule(CronScheduleBuilder.cronSchedule("0 15 1 * * ?")) // Note: Quartz uses '?' for day-of-month/week when the other is specified
.build();
scheduler.scheduleJob(job, trigger);
} catch (SchedulerException e) {
e.printStackTrace();
}
}
}
// Assuming MyTask.class is defined elsewhere and implements org.quartz.Job Last verified:
Kubernetes
Save this YAML to a file (e.g., weekly-cronjob.yaml) and apply it using kubectl apply -f weekly-cronjob.yaml. Replace your-docker-image:latest with your actual container image.
apiVersion: batch/v1
kind: CronJob
metadata:
name: weekly-sunday-task
spec:
schedule: "15 1 * * 0"
jobTemplate:
spec:
template:
spec:
containers:
- name: task-container
image: your-docker-image:latest
command: ["/bin/sh", "-c", "echo 'Running weekly task'; sleep 30"]
restartPolicy: OnFailure Last verified:
AWS EventBridge Equivalent
Standard cron expressions often need conversion for AWS EventBridge schedules.
cron(15 1 ? * 0 *) Frequently Asked Questions
What does this cron expression do?
This expression, '15 1 * * 0', means the task will execute every Sunday at precisely 1:15 AM.
How does time and timezone affect this schedule?
The execution time is based on the server's local timezone. If the server's timezone is not correctly configured or if Daylight Saving Time (DST) changes occur, the exact execution time might shift relative to a fixed UTC time.
How can I verify this schedule is running correctly?
Check your system logs for entries created by the scheduled task. You can also add a logging statement to the task itself that records the execution time and date.
What is a common variation of this schedule?
A common variation might be running the task on weekdays only. For example, '15 1 * * 1-5' would run from Monday to Friday at 1:15 AM.
What is a potential pitfall with this schedule?
If the task takes longer than an hour to complete, subsequent runs might overlap. Since this runs weekly, if the task runs over the 1:15 AM mark into the next Sunday, the next run might start before the previous one has finished.
More schedules like this
Explore Database Backup →* Try any expression
Standard, Quartz, AWS EventBridge, Jenkins, named schedules (@daily, @hourly…)
* Keep Exploring