cPanel cron jobs let you run a command on a fixed schedule from the panel's Cron Jobs tool, with no SSH session needed. You set five time fields, paste the command, choose where the output goes, and cPanel writes the entry into your account's crontab for you.
This guide covers the whole cycle: adding a job, testing it, reading its output, then editing, disabling or deleting it.
Before you start
- A Linux VPS with cPanel & WHM installed and licensed. cPanel licences come from the cPanel vendor — see how to activate a cPanel licence if the panel is showing errors.
- Your cPanel account username and password, and the address you use to reach the panel:
https://203.0.113.10:2083orhttps://example.com:2083. If you have lost the login, it can be reset in WHM. - The script or command you want to schedule, tested once by hand. Cron runs unattended, so a command that already fails from the shell will not magically work on a schedule.
- The server's time zone, because cron uses server time, not your laptop's.
Note: Cron jobs added in cPanel run as your cPanel user. Anything that needs root (restarting services, editing system files) belongs in root's crontab, which you edit over SSH as root.
Create a cPanel cron job
- Log in to cPanel at
https://203.0.113.10:2083. - Type
cronin the search box at the top of the panel, then open Cron Jobs. It also lives under the Advanced section. - Pick a schedule. The Common Settings dropdown fills the fields for you; choose Once Per Day, Once Per Hour and so on, or type the values yourself.
- Fill the five time fields:
- Minute — 0 to 59.
- Hour — 0 to 23, in 24-hour time.
- Day — 1 to 31.
- Month — 1 to 12.
- Weekday — 0 to 7, where both 0 and 7 mean Sunday.
A few common patterns, written as you would set them in the panel:
Every day at 02:30 minute=30 hour=2 day=* month=* weekday=*
Every 5 minutes minute=*/5 hour=* day=* month=* weekday=*
Every Sunday at 03:00 minute=0 hour=3 day=* month=* weekday=0
First of the month, 04:15 minute=15 hour=4 day=1 month=* weekday=*- Enter the command. Always use absolute paths, because cron does not open a login shell and does not know your aliases or your current directory. For a PHP script:
/opt/cpanel/ea-php82/root/usr/bin/php /home/deploy/public_html/cron.php >> /home/deploy/logs/cron.log 2>&1The PHP CLI path depends on the EasyApache version, so check which binaries exist before you paste one in:
ls /opt/cpanel/ea-php*/root/usr/bin/php>> /home/deploy/logs/cron.log 2>&1 appends the normal output and the error output to a log file. Without it, the job stays silent and you have nothing to read when it misbehaves.
- Set the Email field. This is where the job's output is sent. Use an address you actually read, and set it deliberately — behaviour when the field is left empty varies between cPanel versions, so do not rely on the default.
- Click Add New Cron Job.
The job appears in the Current Cron Jobs list below the form. That list is your source of truth: it shows the schedule, the command, the next run time and the buttons to edit or delete.
Tip: If cPanel refuses to save and mentions a cron job limit, an account limit is in place. On your own VPS you can change it in WHM — search for cron in WHM's search box.
Manage cPanel cron jobs: edit, disable and delete
Edit — click Edit next to the job, change the time fields, the command or the email address, then save. cPanel rewrites the crontab entry straight away.
Disable without deleting — keep the job and its command for later by setting a schedule that never occurs, for example day 31 and month 2 (31 February). Set it back to real values when you want it running again.
Delete — click Delete next to the entry. This removes the schedule permanently and keeps no copy.
Warning: Before deleting a job, check what it does. Removing a nightly database dump or a log rotation job without a replacement is a common way to lose backups. Confirm the task is covered elsewhere before you clear the entry.
Warning: Manage your cPanel user's cron jobs in the panel, not with crontab -e over SSH. cPanel stores these jobs in its own database and rewrites the user's crontab, so manual edits to that file are overwritten.
Check it works
Do not wait a day to find out. Give the job a temporary */5 schedule, let it run, and watch the result.
- Read the log file the command writes to:
tail -n 20 /home/deploy/logs/cron.log- Confirm the script ran as the right user — files it creates should be owned by
deploy:
ls -l /home/deploy/logs- Check the job is actually in the crontab cPanel generated:
crontab -l- If nothing appears anywhere, look at the system cron log as root. On AlmaLinux and Rocky it is
/var/log/cron; on Debian and Ubuntu, cron writes to the journal and to/var/log/syslog:
journalctl -t CRON -n 20Once the job works, set the schedule you actually want.
Troubleshooting
- The job never runs — the time fields are in the wrong order, or the entry was saved against a different account. Check the Current Cron Jobs list; the next run time shown there tells you whether cPanel understood the schedule.
- "Command not found" in the log — cron uses a minimal PATH, so short commands like
phpormysqldumpfail. Use the absolute path (/usr/bin/mysqldump,/opt/cpanel/ea-php82/root/usr/bin/php) or set the full path inside a shell script. - Permission denied — the script is not executable or is owned by another user. Fix it with
chmod +x /home/deploy/bin/job.shand check the owner withls -l. - The command works over SSH but not from cron — cron starts in the user's home directory and without your shell profile. Any relative path, environment variable or alias in the command will break. Make it absolute.
- An email every minute — the command writes to standard output on each run. Send output to a log file or to
/dev/nullwith> /dev/null 2>&1, and keep the email field for jobs whose output you genuinely need. - The job runs hours off schedule — the server time zone is not what you assumed. Check it with
dateover SSH and align your schedule with it.
Next steps
- Schedule tasks with cron on Linux for the syntax and shell side of cron.
- Automating MySQL backups with mysqldump and cron for a database dump job you can paste into the panel.
- Back up your Linux VPS with rsync, restic and cron to cover files as well as databases.
- Automating server maintenance with cron jobs and shell scripting for log rotation, clean-up and update tasks.
