SOLVED Can I change the time Cpanel cronjobs are run

Operating System & Version
centos7
cPanel & WHM Version
84.0.21

ds_thinksmart

Registered
Feb 7, 2020
2
1
1
Australia
cPanel Access Level
Root Administrator
The (/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp --cron > /dev/null) command is being run at a time which causes issues when it auto updates services like mysql which are in the middle of a backup.

Is it safe to change the time this cronjob runs from the crontab so that it does not conflict? Do any of the other Cpanel cronjobs rely on the update cron running first?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,259
313
Houston
You can change the time cron jobs are run, there isn't anything that is scheduled in root's cron jobs that is dependent on the upcp cron to complete. If you'd like to modify the time you can do so from WHM>>Server Configuration>>Configure cPanel Cron Jobs
 
  • Like
Reactions: ds_thinksmart

renecd

Member
Mar 26, 2020
9
0
1
badland-vibes-tackiness-handoff
cPanel Access Level
DataCenter Provider
You can change the time cron jobs are run, there isn't anything that is scheduled in root's cron jobs that is dependent on the upcp cron to complete. If you'd like to modify the time you can do so from WHM>>Server Configuration>>Configure cPanel Cron Jobs
Is this just a frontend to the root crontab provided for convenience, or does it link in with anything else?

Reason I ask is that there is a huge inconvenience with the backup system: There is no way to have it remove an old backup before starting a new. For example, we move backups offsite, but want to leave the last backup on the server until next backup starts, in order to be able to quickly restore files/sites from the most recent backup without having to restore it over the network. Cpanel has the option of storing just one backup -- unfortunately it doesn't delete that until the next backup is complete. I can kinda understand the logic in this: If this is your only backup, you don't want to lose it. On the other hand, you backups should be stored off site, in in our case we just don't want to waste expensive SSD disk space on extra backup space, so we want to remove the old one immediately before starting a new. Before you suggest it, yes it has already been added to the wishlist years ago, but obviously Cpanel don't think it is a high priority.

Anyway, so what I want to do instead is to write a small wrapper script that starts by removing old backups, start the Cpanel backup and finally start the Borgbackup offsiting process. For that reason I want to disable/comment out the Cpanel cron jobs and add my own wrapper instead.

Question is: Will Cpanel, when the next update comes around, automatically restore these cronjobs, or is this safe to do?