in reply to safe cron

yes, that is EVIL that -e and -r are next to each other on the keyboard and -r doesn't confirm. I have conditioned my self to put a 2-second pause before hitting ENTER after typing "crontab -X" to make sure i did 'e' and not 'r'.

My more robust (than double-checking my typing) solution was to add these two cron entries:
0 1 * * * /usr/bin/crontab -l > /home/myname/archive/backup/crontab/dr +w.cron 0 5 * * * /usr/sbin/logrotate --state /home/myname/.logrotate.status / +home/myname/.logrotate
And this ~/.logrotate entry (i actually have a bunch of other stuff in there too):
/home/myname/archive/backup/crontab/drw.cron { rotate 28 daily compress }

Replies are listed 'Best First'.
Re^2: safe cron
by mincus (Chaplain) on Jun 14, 2005 at 14:18 UTC
    I did also start backing up the crontab in my daily backup... it was just one of those frustrating, "why didnt they see this problem... must fix" impulses that seems to take over your brain as a perl hacker.
Re^2: safe cron
by cog (Parson) on Jun 14, 2005 at 14:13 UTC
    that is EVIL that -e and -r are next to each other

    Having the d and the f next to each other is not any better...

    Quick, f*ck!