A cron job is a task that is automatically executed in an operating system. To execute these tasks, the system regularly provides commands. It could be a simple task, but generally, multiple complex tasks are used, hence several cron jobs. cPanel & WHM execute several essential server maintenance scripts in this way, and you or your users can also schedule and execute scripts on your cPanel hosting.
Create a Cron Job on cPanel
Log in to cPanel, scroll down to the section Advanced and click on the icon Cron Jobs.
Scroll down to the section Add New Cron Job. You can either select from the dropdown menus Common Settings, or fill in your own custom values. Fill out the form as follows: Common Settings: this option allows you to select a predefined interval for executing your cron job. If the time you need is not available in the dropdown list of Common Settings, switch and choose from the settings Minute, Hour, Day, Month and Dayof the week. You notice that each of these entries similarly has a drop-down menu Common Settings. Choose the appropriate settings. The last field of the section Add New Cron JobOrder. This is where you enter the file path containing the server command that will be executed at the intervals you just specified.
A confirmation will appear to confirm that the Cron task has been added.
Edit a Cron Job
Scroll to the bottom of the page, and under Current Cron Jobs, locate your cron task and click the button Edit
Click the link Edit, this will display the cron task settings. Make the necessary changes and click the button Edit line.
Delete a cron job
Under Current Cron jobs, locate your cron job, then click the button Delete. Under "Delete this cron job?" text, click the button Delete.