Knowledgebase: cPanel
Create and Delete a Cron Job
Posted by H9 Admin on 02 June 2015 04:00 PM

Cron jobs run scheduled commands at specific times. The Cron Jobs tool in cPanel is helpful for setting up automated maintenance and other unmanned server duties.

Note: you need to have a good knowledge of Linux commands before you can use cron jobs effectively. Check your script with your hosting administrator before adding a cron job.

Create a Cron Job

To create a cron job:

  1. Log into cPanel

  2. Click Cron Jobs, from the Advanced section

    Advanced section

  3. Under Cron Email, make sure the current email address is valid; if not enter a new, valid email and click Update Email

    You will receive an email after the cron job has finished.

  4. Under Add New Cron Job, use the Common Settings dropdown menu to choose from a list of regularly used intervals or set the frequency of your cron job by using the dropdown box next to each time unit

    Add a new cron

  5. In the Command field, enter the desired command (like mysql -u mysql_user -ppassword database_name < backup.sql, depending on what you want to do with your cron)

  6. Click Add New Cron Job

    Save your new cron

    Your cron job will then be execute a file at a certain time, date and repetition, according to the settings you selected.

Remove or Edit a Cron Job

  1. After you log into cPanel click Cron Jobs from the Advanced section

  2. Scroll down to the last section called Current Cron Jobs

    Current Cron jobs

  3. Find the cron job you wish to edit or delete

  4. Under Actions, for the appropriate cron job, click either Edit or Delete

    Note: the edit panel has fewer common settings to choose from, so if you are having trouble getting the correct interval, copy the command, delete the cron job and then recreate it using the Add New Cron Job section.

 addnewcron.png (82.98 KB)
 advanced_section.png (20.64 KB)
 currentcrons.png (14.22 KB)
 savecron.png (48.09 KB)
(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
Full Name:
Help Desk Software by Kayako fusion