Help - Search - Members - Calendar
Full Version: crontab wiped out - help!
The Planet Forums > Control Panels > Plesk
noracks
Hello,

I mistakenly re-wrote my crontab. Instead of -e to add a new entry, it got replaced with a file containing my custom cron commands!

Does anyone know what the default cron should look like? I have just edited my cron to look like this:

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
0-59/5 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg

Is anything missing? Is the .../mrtg/ job necessary or can I remove that?

Thanks!
a.
noracks
no input here? moderator, members, pleeez help!
noracks
Thanks everyone for all the help @#$#)_$!
a.
bobk
heh... well, not everybody sees every message. Here are the default entries:

CODE
14      5       *       *       *       /usr/local/psa/bin/mysqldump.sh >/dev/null 2>&1

7       4       *       *       *       /usr/local/psa/admin/sbin/statistics >/dev/null 2>&1


There's also an entry for time synch, which you can probably fix by re-entering it in the control panel.
NightHawk
QUOTE
Originally posted by noracks
Hello,

I mistakenly re-wrote my crontab. Instead of -e to add a new entry, it got replaced with a file containing my custom cron commands!  

Does anyone know what the default cron should look like? I have just edited my cron to look like this:

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
0-59/5 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg

Is anything missing? Is the .../mrtg/ job necessary or can I remove that?

Thanks!
a.


ok..I hope you didn't put that information in your root crontab...that is the contents of /etc/crontab . What was posted by bobk is the correct default entries for the root crontab.

(and sorry, I have been away from the forum for a few weeks....btw....these crons could have been recreated by running the lastest plesk patch again.)
noracks
Great! Thanks bobk. Thanks NightHawk. .... I hope I didn't do too much damage with the bad setting I've had on for a while (i.e. the /etc/crontab contents!)
a.
NightHawk
QUOTE
Originally posted by noracks
Great! Thanks bobk. Thanks NightHawk. .... I hope I didn't do too much damage with the bad setting I've had on for a while (i.e. the /etc/crontab contents!)  
a.


well..you probably ran a few things...a few too many times.....but since your box is still running...you are not in too bad of shape...hehe


anyway...glad you got it fixed.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.