Overview
Cron jobs allow you to automate script execution at scheduled times or
intervals directly from your server. Through this interface, you can set up and manage
scheduled tasks such as upcp, backup, and cpbackup for streamlined server maintenance.
Note:
Running cron jobs too frequently can negatively impact server performance. It’s best to
schedule them to run once per day to maintain optimal efficiency.
How to Configure a Cron Job
To set up a cron job in cPanel, follow
these steps:- Choose your preferred time intervals for when the cron job should run. (See details in
the "Cron Job Intervals" section below.)
- Click Save to apply your settings.
Cron Job
Intervals
Use the following parameters to define your cron job schedule:| Schedule | Parameters |
|---|
| Minute | The specific minute of each hour the job should run (e.g., 15 means it runs
at 15 minutes past the hour). |
| Hour | The hour of the day (24-hour format) to run the job (e.g., 21 means 9:00 PM
server time). |
| Day | The day of the month the cron job should execute (e.g., 15 for the 15th of
the month). |
| Month | The month of the year to run the job (e.g., 7 for July). |
| Weekday | The day(s) of the week to run the task (e.g., 0 for Sunday, 6 for Saturday).
|
Note on Using Wildcards
You can use the asterisk (*) symbol to indicate that a cron job should
run at every possible value for that time field.
Example:To run a process daily at 9:15 PM (which is 21:15 in 24-hour time), use
the following configuration:
| Setting | Value |
|---|
| Minute | 15 |
| Hour | 21 |
| Day | * |
| Month | * |
| Weekday | * |
The upcp
Command
The upcp cron job handles automatic updates for cPanel & WHM. By
default, this script is set to run once per day at a random time between 9:00 PM and 6:00 AM
local server time.
Best Practice:
Schedule the upcp cron job to run once daily during off-peak hours. This helps reduce
load during high-traffic periods and ensures your system stays updated without
performance interruptions.
The backup
Command
The backup script executes regular server backups as defined in your WHM
Backup Configuration (WHM » Home » Backup » Backup Configuration). By default, it’s
scheduled for 2:00 AM local time, an ideal off-peak window for most environments.
If backups are disabled in the WHM configuration, the script will still
execute — but it will exit immediately without running any backup tasks.
Pro Tip:
Ensure your backup cron job runs early enough during off-peak hours, so it finishes
before your traffic starts picking up.
The cpbackup
Command
The cpbackup script runs legacy backups on your cPanel server. By
default, this script runs at 1:00 AM local time. Just like the backup script, if legacy
backups are disabled, this script exits after executing.
Recommendation:
Set the cpbackup cron job for a non-peak hour, and make sure it has enough time to
complete before your server enters its busy period.