Your Gateway To Digital Success
Wesbytes Blue Logo

Wesbytes Knowledge Base

Search our articles or browse by category below

How to Create a cronjob in cPanel

Last modified: July 2, 2022
You are here:
Estimated reading time: 1 min

What are Cron Jobs?

Cron jobs are scheduled tasks that the system executes automatically at set periods or durations. In essence, a cron job consists of a number of straightforward activities that are executed by a script file.

Adding a Cronjob in cPanel standard mode

  1. Firstly, Click on the icon Cronjob in cPanel on the main screen of your cPanel interface.
  2. Secondly, Click on Standard to access the Standard Cron Manager.
  3. Thirdly, Enter the email address you wish the output of the command run by the cronjob to be sent to in the field Will be sent: under Cron Email section. **Note: If you want to disable email notifications, you can add the /dev/null 2>&1 line to the end of the command.
  4. Next, Enter the command you wish the cronjob in cPanel to run in the Command text box.
  5. After that, Select the interval you wish the command to be run by selecting an option in each of the boxes.
  6. Then, Click on Add New Cron Job to save your changes and set up your cronjob.

Adding a cronjob in advanced mode

  1. Firstly, click on the icon Cronjobs on the main screen of your cPanel interface to access the Cronjobs Menu.
  2. Secondly, Click on Advanced (Unix Style) to access the Cron Manager.
  3. Thirdly, Enter the email address you wish the output of the command run by the cronjob to be sent to in the field Will be sent: under Cron Email section.
  4. Next, Enter the command you wish the cronjob to run in the Command text box.
  5. After that, Select how often you wish the command to be run by placing a number or * in each of the boxes.
  6. Lastly, Click on Add New Cron Job to save your changes and set up your cronjob.

Editing a cron job

  1. Firstly, login to cPanel.
  2. Next, click Cron Jobs under ADVANCED section in the home screen.
  3. Then, click Edit for the cron job you want to edit under Current Cron Jobs section.
  4. Lastly, click Edit Line.

Deleting a cron job

    1. Firstly, login to cPanel.
    2. Secondly, click Cron Jobs under ADVANCED section in the home screen.
    3. Next, click Delete for the cron job you want to delete under Current Cron Jobs section.
    4. Lastly, confirm again and click Delete.
Was this article helpful?
Dislike 0
Views: 7