Knowledge Base
How do I Create and Delete a Cron Job?
Cron jobs run scheduled commands at specific times. The Cron Jobs tool in cPanel helps set up automated maintenance and other unmanned server duties.
Warning: You need to have a good knowledge of Linux commands before using cron jobs effectively. Check your script with your hosting administrator before adding a cron job.
For more detailed information on how cron works, please see:
This article discusses the following topics.
How to create a Cron job
- Log in to cPanel. There are two ways to access your cPanel.
- Option 1: Access your cPanel via direct link.
- Option 2: Access your cPanel via your Customer Portal.
- Log in to your Customer Portal.
- Click the Hosting tab in the left-side menu.
- If you have one hosting package in your account, proceed to step 3.
- If your account has multiple hosting packages, choose the plan you want access to, then click Manage.
- Scroll down to the Server Information section.
- Under Quick Links, click the cPanel button.
- 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, or set the frequency of your cron job by using the dropdown box next to each time unit. Common settings range from every minute to once a year.
- In the Command field, enter the desired command.
- 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.
Note: The Edit panel has fewer common settings to choose from, so if you are having trouble getting the correct interval, copy the command, delete the cron job, and recreate it as instructed above.
* Your feedback is too short