A cron job runs a command or script on a schedule, for example every day at midnight. You add it in cPanel under Advanced, Cron Jobs.
Add a cron job
Log in to cPanel and click Cron Jobs in the Advanced section.
Optional: under Cron Email, enter an address and click Update Email. cPanel then mails you the output each time a job prints something. Leave it if you don't want these emails.
Under Add New Cron Job:
- Common Settings: pick a schedule, for example Once Per Day(0 0 * * *). cPanel fills in Minute, Hour, Day, Month and Weekday for you. You can change each field afterwards.
- Command: the command to run, with full paths (see the examples below).
- Click Add New Cron Job.

The job appears under Current Cron Jobs, where you can edit or delete it.
Command examples
Replace /home/username with your own home directory. cPanel shows it as Home Directory under General Information on the home page (on some servers it is /home2/… or similar).
Run a PHP script:
/usr/local/bin/php /home/username/public_html/scripts/cleanup.php
Run WordPress' scheduled tasks reliably, without any email:
/usr/local/bin/php /home/username/public_html/wp-cron.php >/dev/null 2>&1
If you use this, also add define('DISABLE_WP_CRON', true); to wp-config.php, so WordPress stops running its tasks on page visits.
To run a script with the PHP version you chose for a domain in MultiPHP Manager, use that version's path instead of /usr/local/bin/php, for example /usr/local/bin/ea-php83 for PHP 8.3. The Cron Jobs page shows this example too.
Read the time fields
| Minute | Hour | Day | Month | Weekday | Runs |
|---|---|---|---|---|---|
*/15 | * | * | * | * | Every 15 minutes |
0 | * | * | * | * | Every hour, on the hour |
30 | 2 | * | * | * | Every day at 02:30 |
0 | 8 | * | * | 1-5 | Monday to Friday at 08:00 |
0 | 0 | 1 | * | * | On the 1st of every month at midnight |
The times follow the server's clock, which may not be your local time zone.
Common problems
The job doesn't seem to run
Remove >/dev/null 2>&1 for a moment and set a Cron Email: the email shows the error. Most often a path is wrong. Use full paths everywhere, because cron doesn't start in your website folder.
Too many cron emails
Add >/dev/null 2>&1 to the end of the command. cPanel only sends an email when the command prints something.
"Could not open input file"
PHP can't find the script. Check the path and the spelling (paths are case-sensitive) in the File Manager.
Related articles
- Change the PHP version and PHP settings
- View the error log
- Manage files: edit, move, zip and set permissions
- Install Node.js on shared hosting without root
Still stuck? Open a support ticket and we'll help.