Short answer: Open cPanel Cron Jobs, choose common schedule intervals, enter your PHP binary execution command (e.g. /usr/local/bin/php ~/public_html/cron.php), and click 'Add New Cron Job'.
Complete instructions for scheduling automated background tasks, configuring PHP script paths, and suppressing email output in cPanel.
Quick reference
| Cron Interface | cPanel > Advanced > Cron Jobs |
|---|---|
| PHP CLI Binary Path | /usr/local/bin/php |
| Suppress Output | >/dev/null 2>&1 |
| Standard Interval | */5 * * * * (Every 5 minutes) |
Steps
- Navigate to Cron Jobs: Under the Advanced category in cPanel, select Cron Jobs.
- Configure Notification Email: In the Cron Email box, specify where execution output should be sent, or leave it blank if suppressing output.
- Select Execution Schedule: Use the Common Settings dropdown (e.g., Once an hour, Once a day) or specify standard crontab timing:
* * * * * │ │ │ │ │ │ │ │ │ └── Day of week (0 - 6) (Sunday = 0) │ │ │ └────── Month (1 - 12) │ │ └────────── Day of month (1 - 31) │ └────────────── Hour (0 - 23) └────────────────── Minute (0 - 59) - Construct the Command: Always use the absolute path to the PHP binary and your script:
/usr/local/bin/php /home/YOUR_USER/public_html/cron.php >/dev/null 2>&1 - Save: Click Add New Cron Job. The task will be active immediately.
Optimized Linux Cron Command Format
# Run a PHP script with the server PHP binary, without the web server
/usr/local/bin/php /home/USER/public_html/cron.php >/dev/null 2>&1
# Run the WordPress cron through WP-CLI
wp cron event run --due-now --path=/home/USER/public_html
Troubleshooting and tips
- Cron Job Spams Mailbox: Append
>/dev/null 2>&1to the end of the command string to silence standard output and errors. - Relative Paths Fail: Never use
php cron.php. PHP CLI cannot resolve the current working directory reliably. Always supply full absolute paths like/usr/local/bin/php /home/username/public_html/.... - 508 Resource Limit during Cron: Running heavy tasks (e.g. database imports or large backups) every minute will exhaust your CloudLinux CPU limits. Spread executions across off-peak hours.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket