Hosting Tutorial & Guide

What Is Cron Job? How to Create One in cPanel?

updated on Oct 20, 2014
What Is Cron Job? How to Create One in cPanel? A large number of webmasters have heard about Cron Job for many times, but they don't know what it is clearly. Actually, a Cron Job is a command of Linux for arranging a script or task on the server to finish tasks repeatedly and automatically. The scripts working as a Cron Job are mainly used to alter databases and files. Meanwhile, they also can execute other tasks like sending email notifications, which doesn't require data modification on a server.

Webmasters can set Cron Job to run by month, year, week, day, hour and minute, as it is a time-based job scheduler. To ensure that no unnecessary loads on the server caused by excessive Cron Jobs, many shared web hosting companies limits Cron Jobs to run with an interval more than 15 minutes, such as BlueHost. In this way, webmasters are capable of running sites smoothly and stably.

What's more, if you want to save disk space, you are able to set a Cron Job to delete the temporary files every week or every 10 days. Besides, to perform some certain functions, you need to set up a Cron Job when you are using a popular software, such as Drupal, which is one of the most famous and widely used CMSs.

How to Set a Cron Job in cPanel?

In below, we have listed the main steps of creating a Cron Job in cPanel that is the most popular and easy-to-use control panel adopted by numerous popular web hosting companies. Move on to learn the details.

To create a Cron Job in cPanel, you need to go through the following steps:

1. Log into cPanel and scroll down to the Advanced section. In the Advanced section, there are many clicks, such as Image Manager, Index Manager, Submit a Support Request, Cron Jobs, and much more. You need to click Cron Jobs.

Cron Job Creation Step 1

2. Then, you can see 2 click buttons on this page – Standard and Advanced (Unix Style), click the Standard button to create a Cron Job in Standard mode.

3. After this, enter an email address. The output of the Cron Job or any errors resulting in attempting to execute this tool will be sent to this address. Therefore, make sure that the email address is valid. If not, enter a new account and click Update Email. As soon as the Cron Job is created, you will receive an email. Besides, you will receive a message every time this job runs.

4. Below the Entry 1, you need to enter the command to run, like typing a command from a shell interface. First, enter the program to run, followed by many parameters.

5. Choose when and how often the Cron Job should run. If you want to run the script every hour every day, in the Minute(s) menu, you should keep the "0" option selected, which means the job will run on the hour. Next, in the Hour(s) menu, select the "Every Hour" option; in the Day(s) menu, select the "Every Day" option; in the Weekday(s) menu, keep the Every Week Day option selected; in the Month(s) menu, keep the "Every Month" option selected.

Cron Job Creation

6. Click the Save Crontab button, then you have finished creating a Cron Job in cPanel.

Reputed Web Hosts Offering Cron Jobs

On the market, there are hundreds of shared web hosts offering Cron Jobs. Since 2008, we have reviewed over 200 web hosts and found that the following companies are the best, each of which provides Cron Jobs, cPanel, and numerous outstanding features. Besides, they all offer 24x7 US based technical support via phone, live chat and email to help customers deal with any hosting issue.

More details about the shared hosting service of the 3 providers are in the table below.