A Cron Job allows you to automate repetitive tasks such as backups, email dispatch, or data updates at specific intervals. You can easily create and manage cron jobs directly through Cpanel.
Go to https://yourdomain.com:2083
and log in. Then open the “Cron Jobs” section.
If you want to receive email reports when a cron task runs, enter your address in the “Cron Email” field.
In the “Add New Cron Job” section, set your desired schedule:
Then enter the command to run (example):
php -q /home/username/public_html/cron/backup.php
Click “Add New Cron Job” to save your task. The newly created cron job will appear in the list below.
To verify the cron job, check after the scheduled time to confirm the script has executed. View the cron log in the /tmp
directory for error messages if necessary.
Note: Ensure your file paths and permissions are correct. Incorrect settings may cause cron jobs to fail.