Cron Jobs in Farsi is a tool that is used to execute specific commands at a specific time. If we want to have a specific process or function at a specific time or with repetition in host a Linux-based Considering that there is no comprehensive and complete training in this field on the Persian web, we have decided to introduce you to this widely used feature in Linux and teach you how to work with it.
Training Cron Jobs cPanel
As mentioned, Cron Jobs is a feature of Linux-based operating systems. But in web hosting, this feature is provided as a tool to host users. In this tutorial, we will introduce and teach Cron Jobs with the CPanel control panel. To access the Cron Jobs tool, just proceed as follows:
- Login to cPanel
- Click on the Cron Jobs option located in the ADVANCED section
Before starting the work, it should be noted that there is a section called Cron Email on the special page. As shown in the image below, where you can enter your email so that Cron Jobs execution or error messages will be sent to you.
How to create Cron Jobs in cPanel
The most common application of kran jobs in the host is to call executive commands. These commands can be in hundreds of different modes and can be considered based on the need. One of the most important applications of Cron Jobs in FA host is in WHMCS automation. As you know, several thousands of users are members of the Fa host user area portal system, and all of them have active services. Issues such as invoicing, notification for renewal, suspension, unblocking, and dozens of other cases cannot be managed normally and with the performance of human resources! So here is the solution to run automatically and do the mentioned things.
Creating Cron Job types in CPanel
As mentioned, the types of commands and allowed functions can be defined in the job limit. Here are some examples:
Example 1: Suppose we want to run the task.php file in the home/user/public_html path every 30 minutes.
To do this, just select Twice Per Hour from the Common Settings drop-down menu, as shown in the image below.
Example 2: suppose we want the file task.php to be executed in the home/user/public_html path on the 10th day of every month at 14:30!
For this purpose, you must set the items in the image below.
With the above examples, it is usually clear how to work with Jobs, but if you still have any doubts or questions. Please raise them in the comments section so that they will be answered.