Creating a cron job involves scheduling a task to run automatically at specified intervals on a Unix-like operating system, such as Linux.
Here's how to create a cron job:
- Log in to cPanel.
- In the Advanced section, click Cron Jobs.
- Under Cron Email, make sure the current email address is valid. If not, enter a new, valid email and click Update Email. You will receive an email after the cron job has finished.
- Under Add New Cron Job, use the Common Settings dropdown menu to choose from a list of regularly used intervals, Common settings range from every minute to once a year.
Each asterisk represents a time unit (minute, hour, day of the month, month, and day of the week) and can be replaced with a specific value or range.
5. In the Command field, enter the desired command.
6. Click Add New Cron Job.
Your cron job will now execute a file at a specific time, date, and repetition according to the settings you entered.
How to edit or delete a Cron job
- Within the Advanced section of cPanel, click the Cron Jobs icon.
- Scroll down to the Current Cron Jobs section.
- Locate the cron job you need to manage.
- Under the Actions column, click Edit or Delete.