Knowledge Base

How to add a Cron Job

The Cron Jobs are scheduled tasks that run at predefined times or intervals on the server. In this section you can configure some variables to configure the Cron Jobs that can run within cPanel.

There are two ways to add a Cron Job, the first and most comprehensive is to do it directly in cPanel and the second more fast and easy from the customers Area. To do so in cPanel, log in to cPanel with your account and go to Advanced > Cron Jobs.

Once we are in the section of the functionality, we will see three options for scheduled tasks, any of these three options will have the following variables:

  • Minute: The number of minutes between each run of the task in the cron or the minute of each hour you wish to run the cron task. For example, 15 to run the cron job every 15 minutes.
  • Hour: The number of hours between each run of the task in the cron job, or the hour of each day (in military format) you wish to run the cron task. For example, 2100 to run the cron job at 9:00.
  • Day: The number of days between each run of the task in the cron job, or the day of the month you wish to run the cron task. For example, 15 to run the cron task on the 15th day of the month.
  • Month: The number of months between each run of the task in the cron or the month of the year you wish to run the cron task. For example, 7 to run the cron task in July.
  • Weekday: Day(s) of the week on which you want to run the cron task.

How to use the configuration

Replace the * for the value that you want to run the Cron Job, if there is a value, change whereby better like it. For example, a value of 0 indicates Sunday, or a value of 6 indicates Saturday. For example, an established process to run every day to the 21: 15 (21:15 in 12-hour format) would be established at: Minute = 15, Hour = 21, Day = *, Month = *, Weekday = *.

Note: The Cron Jobs are executed too often, can load the server, therefore manage tasks slowly. We recommend that you run the Cron Jobs once per day.

Please rate this article to help us improve our Knowledge Base.

0 0