Setting Cronjobs

Adding a cron job

Step 1: To access the Cron Jobs Menu, click on the corresponding icon located on the main screen of your cPanel interface [cPanel >> CronJobs].

Step 2 (optional): Enter the email address where the cron output will be sent to in the corresponding field.

Step 3: Enter the command you wish the cron job to run in the blank field next to the Command field. [If you do not wish to receive an email notifying you of a specific cron job, add the following line to the command: >/dev/null 2>&1 ] [You may need to specify the location of the binary of the command that you wish to run. eg: /usr/bin/php ]

Step 4: Select how often you wish the command to be run by selecting an option in each of the boxes or by selecting a predefined period from the Common Settings drop-down menu.

Common Settings — This menu allows you to select a commonly used interval without having to specify settings for the minute, hour, day, month, and so on.

Minute — Use this drop-down menu to select the number of minutes between running the cron job, or the minute each hour on which you wish to run the cron job.

Hour — Use this drop-down menu to select the number of hours between running the cron job, or the hour each day on which you wish to run the cron job.

Day — Use this drop-down menu to select the number of days between running the cron job, or the day of the month on which you wish to run the cron job.

Month — Use this drop-down menu to select the number of months between running the cron job, or the month of the year in which you wish to run the cron job.

Weekday — Use this drop-down menu to select the day(s) of the week on which you wish to run the cron job.

Allowed values :-

minute 0-59

hour 0-23

day of month 1-31

month 1-12 (or names, see below)

day of week 0-7 (0 or 7 is Sun, or use names)

Step 5: Click on Add New Cron Job to save your changes and set up your cron job.

ss6

Viewing existing cron jobs

The Current Cron Jobs table displays the cron jobs you have already set up on the server.

From here, you may edit or delete a cron job.

Editing a cron job

To edit a cron job:

Step 1: Locate the cron job you wish to edit.

Step 2: Click Edit.

Step 3: Edit the settings you wish to change.

Step 4: Click Edit Line.

Deleting a cron job

When a cron job is no longer needed, you should delete it so that the command will not continue to run.

To delete a cron job:

Step 1: Locate the cron job you wish to delete.

Step 2: Click Delete.

Step 3: Confirm that you wish to delete the cron job by clicking Delete again.