What is a cron job?

A cron job is utility program that lets users input commands for scheduling tasks repeatedly at a specific time. For example, if you want to back up a file in every six hours, you can set this file backup program easily using cPanel’s cron jobs feature. A cron job Users can determine what kind of task they want to automate and when it should be executed. So let’s stay with us today in this article we will show you how to setup cron job in cPanel.

How to Add a cron job

To add a cron job, you must follow these step by steps:

Step 1: Log in to cPanel. Then scroll down to the “Advanced” section. Find the “Cron Jobs” icon and click on it.

Log in to cPanel

Log in to cPanel

Step 2: Under “Cron Email”, type here e-mail address where you want to receive notifications, and then click Update Email. Every time the cron job runs, the e-mail account receives a notification message. If you do not want to receive e-mail notifications for a particular cron job, you can include >/dev/null 2>&1 to the cron job command, which redirects all output to /dev/null.

Cron Email

Cron Email

Step 3: Under “Add New Cron Job”, define the interval for the command that you want.
If you select an interval option under “Common Settings”, cPanel fills in the values automatically.

Add New Cron Job

Add New Cron Job

Step 4: In the “Command text box”, Enter in the desired command that you want to run.

Step 5: Click the “Add New Cron Job” button. cPanel creates the cron job.

Add New Cron Job

Add New Cron Job

How to Edit a Cron Job

To edit a cron job, you must follow these step by steps:

Step 1: Log in to cPanel. Then scroll down to the “Advanced” section. Find the “Cron Jobs” icon and click on it.

Step 2: Under Current Cron Jobs, click “Edit” button for the cron job that you want to edit.

Step 3: Make the changes that you want, and then click “Edit Line”.

Edit Cron Job

Edit Cron Job

How to Delete a Cron Job

You can delete a cron job when you no longer want a command to run automatically.

To Delete a cron job, you must follow these step by steps:

Step 1: Log in to cPanel. Then scroll down to the “Advanced” section. Find the “Cron Jobs” icon and click on it.

Step 2: Next Under “Current Cron Jobs”, click “Delete” for the cron job that you want to delete.

Delete a cron job

Delete a cron job

Step 3: For Confirmation that the cron job that you want to delete, Click the “Delete” button again to delete it successfully. cPanel deletes the cron job.

Did you find this article helpful? Then you’ll love our support. If you need any other help or support then contact us for more information. We are always here to help you. Click here to visit our today’s hosting plan.

Comments

comments