Tutorials • cPanel
Setting up a cron job in the cPanel panel
This article explains how to set up a cron job in the cPanel admin panel
Views 1280Updated 2 yearsPublished 14/02/2020by Mihai Bobriuc
Introduction
- A cronjob is a command in unix operating systems that is executed at a certain time interval.
The commands used below are examples.
Requirement
- Access to the cPanel control panel.
Steps to follow
- Once logged into the cPanel administration panel, look for the Advanced section in the displayed window and select it from there Cron jobs
- On the next page, it will be possible to set the email address to send the result of running the cron, if this is desired, after which the button is pressed Update Email
- After successfully saving the address, a confirmation message will appear.
- To set the cadence of the cron, you can choose a predefined interval from the Common Settings field, or you can manually set the run interval in each field.
- Hostico does not allow a cron to run with a cadence of less than 5 minutes, or if it takes longer to run, it will set a time that allows the first process to complete before being resumed by the next cron session.
- In the Command field, enter the command you want to execute.
- In this case, the cron will produce a result that will be sent to the previously predefined email address
- If output is not desired, the cron will be directed to delete the report by appending ">/dev/null 2>&1" to the end of the command
- Then the button is pressed Add New Cron Job
- Afterwards, a confirmation message will appear, and the cron will be visible at the bottom of the page where it can be edited.
- If everything went successfully, the cronjob will start running at the times specified by the user.