SOLVED deleted crontab jobs by mistake

oah

Well-Known Member
Jan 23, 2018
58
9
8
Iraq
cPanel Access Level
Website Owner
Hi
I am running CentOS v7.9.2009 STANDARD xen hvm with cPanel Version 106.0.10
We deleted the whole crontab jobs by mistake, can anyone share the default jobs? or is there any way to have the WHM to regenerate them (via forcing a system update or some thing like this)?

Thank you.
 
Last edited by a moderator:

quietFinn

Well-Known Member
Feb 4, 2006
1,696
352
438
Finland
cPanel Access Level
Root Administrator
If you are doing cPanel backups and "Backup System Files" is enabled you find all crontabs in system/dirs/_var_spool_cron.tar.gz
 
  • Like
Reactions: oah

ServerHealers

Well-Known Member
Sep 21, 2015
59
28
68
India
cPanel Access Level
Root Administrator
I believe a force /scripts/upcp might load them all back again (never tested it anyway) or we could restore it back from a system backup as mentioned in above post. I'd look at a fresh cPanel box which we manage, and these are the root level crons in it (might be useful)


49 2 * * * (/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp --cron > /dev/null)
0 2 * * * /usr/local/cpanel/bin/backup
35 * * * * /usr/bin/test -x /usr/local/cpanel/bin/tail-check && /usr/local/cpanel/bin/tail-check
0 6 * * * /usr/local/cpanel/scripts/exim_tidydb > /dev/null 2>&1
30 5 * * * /usr/local/cpanel/scripts/optimize_eximstats > /dev/null 2>&1
5,20,35,50 * * * * /usr/local/cpanel/scripts/eximstats_spam_check 2>&1
45 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_mailman_cache && /usr/local/cpanel/scripts/update_mailman_cache
15 */6 * * * /usr/local/cpanel/scripts/autorepair recoverymgmt >/dev/null 2>&1
*/5 * * * * /usr/local/cpanel/scripts/dcpumon-wrapper >/dev/null 2>&1
0 */2 * * * /usr/local/cpanel/scripts/shrink_modsec_ip_database -x 2>&1
9 2 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify
30 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache
25 */2 * * * /usr/local/cpanel/bin/mysqluserstore >/dev/null 2>&1
15 */2 * * * /usr/local/cpanel/bin/dbindex >/dev/null 2>&1
5,20,35,50 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
@reboot /usr/local/cpanel/bin/onboot_handler
09,39 * * * * /usr/local/cpanel/scripts/clean_user_php_sessions > /dev/null 2>&1
 
  • Like
Reactions: oah

oah

Well-Known Member
Jan 23, 2018
58
9
8
Iraq
cPanel Access Level
Website Owner
I believe a force /scripts/upcp might load them all back again (never tested it anyway) or we could restore it back from a system backup as mentioned in above post. I'd look at a fresh cPanel box which we manage, and these are the root level crons in it (might be useful)


49 2 * * * (/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp --cron > /dev/null)
0 2 * * * /usr/local/cpanel/bin/backup
35 * * * * /usr/bin/test -x /usr/local/cpanel/bin/tail-check && /usr/local/cpanel/bin/tail-check
0 6 * * * /usr/local/cpanel/scripts/exim_tidydb > /dev/null 2>&1
30 5 * * * /usr/local/cpanel/scripts/optimize_eximstats > /dev/null 2>&1
5,20,35,50 * * * * /usr/local/cpanel/scripts/eximstats_spam_check 2>&1
45 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_mailman_cache && /usr/local/cpanel/scripts/update_mailman_cache
15 */6 * * * /usr/local/cpanel/scripts/autorepair recoverymgmt >/dev/null 2>&1
*/5 * * * * /usr/local/cpanel/scripts/dcpumon-wrapper >/dev/null 2>&1
0 */2 * * * /usr/local/cpanel/scripts/shrink_modsec_ip_database -x 2>&1
9 2 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify
30 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache
25 */2 * * * /usr/local/cpanel/bin/mysqluserstore >/dev/null 2>&1
15 */2 * * * /usr/local/cpanel/bin/dbindex >/dev/null 2>&1
5,20,35,50 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
@reboot /usr/local/cpanel/bin/onboot_handler
09,39 * * * * /usr/local/cpanel/scripts/clean_user_php_sessions > /dev/null 2>&1
Thank you this one really helped