Accidentally deleted your cPanel cron jobs?

Well that s what I did with one slip of the command line. Instead of typing crontab -l for a list of the root cron jobs I used the -r switch by accident and poof, off went my root crons…

Dopey I know but I needed to reset the cPanel default cron jobs so after a bit of searching I found the following which should be suitable for anyone else who has fat fingers like me…

Access the root cron:
pico /var/spool/cron/root

And now add the following:
2 0 * * * /scripts/upcp
0 1 * * * /scripts/cpbackup
*/15 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
2,58 * * * * /usr/local/bandmin/bandmin
0 0 * * * /usr/local/bandmin/ipaddrmap
30 21 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl
--notify
0 6 * * * /scripts/exim_tidydb > /dev/null 2>&1
*/5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1

Ctrl + X to save and you’re done.

Moral of the story: put your fingers on a diet and think before hitting enter 😉