BuycPanel Blog

BuycPanel Blog

Latest news and updates

How to Configure cPanel CRON Jobs?

Posted by Allura on 06 02 2018.

A Brief Overview
CRON   is a time based job scheduler in Unix-like computer operating systems. They are used for scheduling tasks on the server. However there is a drawback relating to the software utility CRON.

CRON jobs that run too frequently can reduce the server’s performance. It is recommended to run CRON  jobs once per day.

 
Configure a CRON job
To configure a CRON job the following steps need to be performed:

 	The desired intervals need to be selected for the CRON job that one wishes to configure.
 	Click Commit.


CRON job intervals
The following variables are to be set to configure each CRON job:

 	Minute — Minute of each hour is to be entered at which to run the CRON job. For example, enter 15 to run the CRON job at 15 minutes past the hour.
 	Hour — The hour of each day is to be entered in the 24-hour format at which to run the CRON job. For example,…

A Brief Overview

CRON   is a time based job scheduler in Unix-like computer operating systems. They are used for scheduling tasks on the server. However there is a drawback relating to the software utility CRON.

CRON jobs that run too frequently can reduce the server’s performance. It is recommended to run CRON  jobs once per day.

 

Configure a CRON job

To configure a CRON job the following steps need to be performed:

  • The desired intervals need to be selected for the CRON job that one wishes to configure.
  • Click Commit.

CRON job intervals

The following variables are to be set to configure each CRON job:

  • Minute — Minute of each hour is to be entered at which to run the CRON job. For example, enter 15 to run the CRON job at 15 minutes past the hour.
  • Hour — The hour of each day is to be entered in the 24-hour format at which to run the CRON job. For example, enter 2100 to run the CRON job at 9:00 PM local time.
  • Day — The day of the month is to be entered on which to run the CRON job. For example, enter 15 to run the CRON job on the 15th of the month.
  • Month — Month of the year is to be entered in which to run the CRON job. For example, enter 7 to run the CRON job in July.
  • Weekday — Days of the week are to be entered on which to run the CRON job. For example, Sunday is indicated by the value 0 and Saturday is indicated by the value 6.

For any of these settings, enter * to run the CRON job at all intervals.

For example, to schedule a process to run every day at 9:15 PM (or 21:15 in 24-hour format), use the following settings:

Setting Value
Minute 15
Hour 21
Day *
Month *
Weekday *

 

Command: UPCP

The UPCP script updates CPANEL & WHM to newer versions subjected to conditions. By default, the UPCP script runs at a random time between 9:00 PM and 6:00 AM local time. It is recommended to schedule the UPCP script to run once per day during off-peak hours.

 

Command: backup

The backup script runs the backups that is configured in WHM Backup Configuration interface (Home >> Backups >> Backup Configuration). By default, this script runs at 2:00 AM local time, because this is an off-peak time for most servers. If the backups have been disabled in the Backup Configuration interface, the script immediately exits after it runs.

It is recommended to schedule this CRON job to run during off-peak hours. It is to be ensured that the CRON job runs early enough to allow the server to finish backups before peak traffic resumes.

 

Command: CPBACKUP

You can run legacy backups on your server using the CPBACKUP scripts. Since 1:00 AM local time is usually an off-peak time for most servers, the CPBACKUP script runs at this time.If the legacy backups have been disabled, the script immediately exits after it runs.

It is recommended to schedule this CRON job to run during off-peak hours. It is to be ensured that the CRON job runs early enough to allow the server to finish backups before peak traffic resumes.

 

Conclusion

CRON jobs are the tasks which are scheduled to run at predefined intervals. An email address could be set up when a CRON job can be added by following the prescribed procedure. The day, month, time and year is to be selected specifically for adding the job. The command is to be entered which the user wishes to enter and then the new job is to be added. It is also possible to edit or delete the CRON job by following the prescribed procedure.

This is a sample Comment.