How to set up a cron job in cPanel
A cron job runs a command or a script automatically at fixed times, for example every hour or every night. Websites use cron jobs for scheduled emails, backups, importing products, or running WordPress tasks on time. This guide shows you how to set up a cron job in cPanel.
1) Open Cron Jobs
In cPanel, go to the Advanced section and click Cron Jobs (1).
2) Add a new cron job
- Common Settings (1): choose a ready timing such as Once Per Hour or Once Per Day. The fields below fill automatically.
- Or set the time yourself: Minute (2), Hour (3), Day, Month and Weekday.
- Command (4): the command to run, for example:
/usr/local/bin/php /home/USERNAME/public_html/cron.php >/dev/null 2>&1
Replace USERNAME with your cPanel username. The part>/dev/null 2>&1stops cPanel from sending you an email every run. - Click Add New Cron Job (5).
Your cron jobs appear in Current Cron Jobs (1), where you can edit or delete them.
Useful examples
| Task | Timing | Command |
|---|---|---|
| WordPress scheduled tasks | every 15 minutes (*/15) | /usr/local/bin/php /home/USERNAME/public_html/wp-cron.php >/dev/null 2>&1 |
| Open a URL | once per hour | curl -s https://yourdomain.com/task >/dev/null 2>&1 |
For WordPress, after adding the cron job add define('DISABLE_WP_CRON', true); to wp-config.php so WordPress stops running cron on every visit. This helps speed: see How to speed up WordPress.
Common problems
- The cron job does not run → check the full path of the file and of PHP. Test the command by opening the script in the browser if it is a web script.
- You receive many emails → add
>/dev/null 2>&1at the end, or clear the Cron Email field. - Wrong PHP version → use the PHP path of the version you need, or set the version for the domain in MultiPHP Manager.
Frequently asked questions
What does * mean?
"Every". 0 * * * * means minute 0 of every hour; */15 means every 15 minutes.
Which time zone is used?
The server time. If your task must run at an exact Egypt time, tell us and we will confirm the server time zone.
Can a cron job back up my site?
Yes, with a script, but the simplest way is the Backup tool.


