Home » cPanel » Setting up cron jobs with cPanel

Setting up cron jobs with cPanel

cPanel provides many features to users to manage their sites easily. It allows you to set cron jobs to run scheduled task and scripts on a specific time. In this article, we are going to see the exact steps to set a cron job under cPanel.

What do you mean by a cron job?

A cron is a service that allows users to execute their scripts automatically on a specific time or intervals.

Let’s see the exact steps you have to follow to set up cron jobs under cPanel.

Step 1

Log in to cPanel and scroll down to the Advanced section. Here you have to click the Cron Jobs icon.

Advanced section-Setting up cron jobs with cPanel

Step 2

Now Scroll down to the Add New Cron Job section. You can either select from the Common Settings drop-down menus or fill out values as per your need. You have to fill out the form as follows:

  • Common Settings: This option allows you to select a preset interval/time for your cron job to run.

If you have not chosen one of the preset Common Settings, choose from the other options which allows you to enter either custom value as well as can add preset value:

  • Minute: Enter a custom value or select a preset value from the Common Settings menu.
  • Hour: Enter a custom value or select a preset value from the Common Settings menu.
  • Day: Enter a custom value or select a preset value from the Common Settings menu.
  • Month: Enter a custom value or select a preset value from the Common Settings menu.
  • Weekday: Enter a custom value or select a preset value from the Common Settings menu.

In the following example, you can see a cron job set up to run twice daily.

Step 3

Next, enter the command you want to run in the Command field and click Add New Cron Job.

You will see a confirmation message as the cron job has been added.

 

 

Leave a Reply