Cron Jobs is a tool used to execute specific instructions at a specified time. We need to use Cron Jobs if we want to have a particular process or function at a specific time or with repetitions in a Linux-based server. Considering that there is no comprehensive training in this regard, I have decided to introduce you to this feature and to teach you how to work with it.
How to use Cron Job in cPanel
As stated, Cron Jobs is powered by Linux-based operating systems. In which web hosting companies offer this feature as a tool for users to make automatic and repetitive tasks easier. In this tutorial, we’ll introduce Cron Jobs with cPanel. To access the Cron Jobs tool, just follow these steps:
- Login to the cPanel
- Click on the Cron Jobs option located in the ADVANCED section
- Before you begin, note that there is a section called Cron Email in the Cron Jobs tab below which you can enter your email in order to receive Cron Jobs or crash reports.
Note that if the Cron Jobs runtime is approaching, you should avoid entering the email. The reason is that if, for example, the runtime cycle is run every 5 minutes, within 24 hours, 288 emails will be sent to you, which may be a problem in terms of sending a massive email from the host.
Create Cron Jobs in cPanel
The most common application of Cron Jobs is to host executable commands. These commands can be set to hundreds of different situations and be considered as needed. One of the most important uses of Cron Jobs here at Kiuloper is the WHMCS automation. As you know, several thousand users are logged in to the Kiuloper user portal, and all of them have active services. These services need things such as billing, information for renewal, suspension, blocking and dozens of other items! These simply can not be managed in any way as normal and are not man power-driven! So here is where Cron Jobs come in and save the day!
Create Cron Job Types in cPanel
As stated, all types of commands and functions can be defined on the job boundary. Here are some examples:
Example 1: Suppose we want the task.php file to run in the home / user / public_html path every 30 minutes.
To do this, just select the Twice Per Hour option from the Common Settings drop-down menu below.
With this, other time options for Cron Jobs will be completed automatically. Continue and click on Add New Cron Job link to run Cran Job.
Example 2: Suppose we want the task.php file run on the home / user / public_html path on the tenth day of each month, at 14:30.
To do this, you need to set the items as shown below.
With the above examples, you should now be able to start using Cron Jobs, but if you still have any question, please post it in the comments section, contact us at anytime!