A cron job runs a command or script on a schedule, for example a nightly task for your website.
- In cPanel, open Advanced → Cron Jobs.
- Choose a schedule from Common Settings, or set the minute, hour, day, month and weekday yourself.
- Enter the command, for example:
/usr/local/bin/php /home/username/public_html/cron.php - Click Add New Cron Job.
Use the full path to PHP and to your script. To stop cron emails, add >/dev/null 2>&1 to the end of the command.
Only run jobs as often as you need to: very frequent jobs use your account’s resources.
