Create and Manage Cron Jobs in CPanel
Table of content
Cron jobs are scheduled tasks that the system runs from a script file at predefined times or intervals.
Cron Jobs allow you to automate certain commands or scripts on your server to complete repetitive tasks automatically such as deleting temporary files, generating logs, sending periodic sales reports or stock availability, etc. Setting up too many cron jobs to run too often will surely overload any server and will degrade its performance.
In order to ensure servers' performance, especially on shared hosting, usually a minimum time interval is set to run the repetitive cron jobs - on HostPulse servers this interval is
Before setting up the cronjob, open in a browser the file you wish the cronjob to run to make sure it works correctly.
Proper cron jobs setup is a complex task and requires a good understanding of PHP or other scripting languages. If you have never set up cron jobs before, and you feel even a bit insecure, please consult with the technical support.
Go to cPanel > Advanced and click on Cron Jobs link:
Add a cron email
To set an email address for the system to send notifications when your cron jobs run, enter the email address at which you wish to receive the notifications in the Email text field and click Update Email button:
Add a cron job
To create a cron job, perform the following steps:
Select the interval at which you wish to run the cron job from the appropriate menus, or enter the values in the text boxes.
Common Settings — this menu allows you to select a commonly-used interval.
The system will configure the appropriate settings in the Minute, Hour, Day, Month, and Weekday text boxes for you:
- Minute - select the number of minutes between each time the cron job runs, or the minute of each hour on which you wish to run the cron job.
- Hour - select the number of hours between each time the cron job runs, or the hour of each day on which you wish to run the cron job.
- Day - select the number of days between each time the cron job runs, or the day of the month on which you wish to run the cron job.
- Month - select the number of months between each time the cron job runs, or the month of the year in which you wish to run the cron job.
- Weekday - select the days of the week on which you wish to run the cron job.
In the Command text field, enter the command that you wish the system to run:
Specify the PHP version to run the file and the absolute path to the command, that you wish to run (there must be a space between the two strings):
If you want to disable notifications for a specific cron job, add the following line to the command:
Warning: Be very careful when you use the rm command in a cron job. If you do not declare the correct options, you may delete your home directory's data.
Click the Add New Cron Job button.
The new cron job will appear in the Current Cron Jobs table below:
Edit a cron job
In the Current Cron Jobs table find the cron job that you wish to edit and click Edit:
Edit the settings that you wish to change and click the Edit Line button.
Delete a cron job
Click Delete next to the cron job that you wish to delete:
Click the Delete button.
Cron jobs is a very useful tool but must be managed with extreme caution. If you have any questions our support team will be happy to help you.