How to create Cron jobs

Cron is a time scheduled task in a UNIX system. It’s a series of tasks that the system runs from a script. It is a good way to carry out repetitive tasks efficiently. To set-up a cron job, access cPanel >>> Home >>> Advanced >>>Cron Jobs.

Here you will be able to define the cron task by filling in the boxes as shown below. You will define day and the time when the cron will be executed and also the command that will be run to execute the task. The drop down list on each text box helps in defining the times in a friendly manner.

You can add a Cron email where notifications regarding cron tasks will be sent after they run. To do this simply enter the email address in the text box labelled Email then press Update email.

If you wish to disable email address for all cron tasks, simply remove the email address. I you wish to disable notifications for a particular cron task, follow the steps blow:

  1. Locate the following string:

0 * * * * /home/user/backup.pl
  1. Add the following string to that line:
    /dev/null 2>&1
  2. Save your changes.

To view existing cron jobs, simply check the table Current cron jobs.

To edit a cron task, locate the cron job, click Edit and change the settings you want. Once through, click on Edit Line.

Was this article helpful?

Leave A Comment?