Cron jobs run commands automatically on a schedule. To add one:
- Log in to cPanel and open Cron Jobs under Advanced.
- Pick a schedule using Common Settings (for example, Once Per Hour) or set the minute, hour, day, month, and weekday manually.
- Enter the Command to run. For a PHP script, use the full path, for example:
/usr/local/bin/php /home/user/public_html/script.php - Click Add New Cron Job.
To fetch a URL instead, you can use wget or curl, e.g. wget -q -O /dev/null https://yourdomain.com/cron.php. Avoid running jobs more often than every few minutes on shared hosting. To stop emails on every run, add >/dev/null 2>&1 to the command. If a job does not run, double-check the file path or open a ticket.