Tutorials • cPanel
Setting a cron job in the cPanel interface
Learn how to set up a cron job in cPanel, step by step, to automate commands in Unix systems. Find out details about configuration and notification options.
Views 510Updated 1 anPublished on 14/02/2020by Cătălin Adrian
Introduction
- A cronjob represents a command in Unix operating systems, which is executed at a certain time interval.
- The commands used below are examples.
Requirements
- 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 Cron jobs from there

- On the next page, you will be able to set the email address to which the cron job results should be sent, if desired, after which you press the Update Email button

- After successfully saving the address, a confirmation message will appear.

- To set the cron cadence, you can choose a predefined interval from the Common Settings field or manually set the run interval in each field.
- Hostico does not allow the execution of a cron with a frequency of less than 5 minutes, or if its execution takes longer, a time will be set that allows the first process to complete before being resumed by the next cron session.

- In the Command field, enter the desired command for execution.

- In this case, the cron will produce a result that will be sent to the previously predefined email address
- If sending results is not desired, the cron job will be directed to delete the report by adding "
>/dev/null 2>&1" at the end of the command

- Then press the Add New Cron Job button
- Subsequently, 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.