Setting Up Cron Jobs in cPanel
A cron job runs a script or command automatically on a schedule — clearing old cache files, sending a daily report, or triggering a CMS's scheduled tasks without you lifting a finger. cPanel makes this easy to configure through a simple visual interface, no server access required.
Understanding cron timing
A cron schedule has five fields, in this order: minute, hour, day of month, month, day of week. An asterisk (*) means "every value." cPanel's Cron Jobs page gives you dropdowns for common schedules, plus a "Common Settings" preset list, so you rarely need to type raw cron syntax.
-
0 3 * * *— run once daily at 3:00 AM -
*/15 * * * *— run every 15 minutes -
0 0 1 * *— run at midnight on the 1st of every month
Creating a cron job
- In cPanel, open Cron Jobs under the Advanced section
- Under "Add New Cron Job," choose a preset schedule or set custom minute/hour/day values
- In the Command field, enter the full command, e.g.
php -q /home/username/public_html/cron.php - Click Add New Cron Job — it takes effect on the next matching minute, no server restart needed
Common issues
- Use the full path to PHP and your script — relative paths won't resolve outside the browser
- Add
>/dev/null 2>&1at the end to suppress output emails, or leave it off while testing so cPanel emails you the script's output for debugging - Very frequent cron jobs (every minute) can add real CPU load — space them out where possible, especially on shared hosting
Cron job not running as expected?
Share the exact command with our support team and we'll help you debug it.
Open Client Area