accidentally deleted scheduled daily cron jobs

9 posts / 0 new
Last post
#1 Fri, 03/18/2011 - 10:26
webwzrd

accidentally deleted scheduled daily cron jobs

Silly mistake - I had scrolled down the Scheduled Cron Jobs page and deleted an old cron, forgetting I had a check in the daily crons up above.

This is CentOS 5.5 with Virtualmin Pro and I'm pretty sure I just had the standard entries there. Can anyone tell me an easy way to replace those scheduled crons?

Fri, 03/18/2011 - 10:53
andreychek

Hrm, that's an interesting problem. For future reference, I'd suggest not deleting those ;-)

I'm not sure what exactly to tell you to add -- I think the best way we can tackle that is to have you attach these two files to this thread:

/etc/crontab

/var/spool/cron/crontabs/root

With those, hopefully we can figure out what exactly is missing and get that straightened up.

-Eric

Fri, 03/18/2011 - 13:40 (Reply to #2)
webwzrd

Eric,

Thanks for your help. I don't have /var/spool/cron/crontabs/root, there is /var/spool/cron/root and it seems to contain crons for all the virtual domains along with other things. Is that what you want?

Brian

Fri, 03/18/2011 - 13:43
andreychek

Mmm, yeah, that sounds like it! Different distro's put those files in difference places it looks like.

So yeah, /var/spool/cron/root and /etc/crontab should do the trick.

-Eric

Fri, 03/18/2011 - 13:48 (Reply to #4)
webwzrd

Eric,

Is there a private way to get you these files?

Brian

Fri, 03/18/2011 - 14:01
andreychek

Why don't we start with you just posting the /etc/crontab file, which should be fairly similar across all servers :-)

-Eric

Fri, 03/18/2011 - 14:48 (Reply to #6)
webwzrd

Here it is...

Fri, 03/18/2011 - 14:53
andreychek

Ah, that looks like it may be a straight forward fix. Just add this line to the end of your /etc/crontab file:

02 4 * * * root run-parts /etc/cron.daily

Fri, 03/18/2011 - 15:10 (Reply to #8)
webwzrd

Bingo - that did it!

Eric, I want you to know how much I have appreciated your help, both directly and from the answers you've given other as well.

Thank you very very much!!!

Brian

Topic locked