[olug] crontab -e problems

William E. Kempf wekempf at cox.net
Fri May 23 19:21:48 UTC 2003


Brian Roberson said:
> crontab -l > somefile ; emacs somefile ; crontab somefile

Yes, I know about this work around, but I honestly don't care for it.  You
missed the command to remove somefile, which puts this work around at four
commands, which is a bit much.  Picky, I know.  Maybe I could wrap this in
a shell script and use diff to decide if I need to add it to crontab.

But I'd still like to understand what's wrong here.

> or
>
> export EDITOR=vi ; crontab -e ; export EDITOR=emacs

The interesting thing about this is that, for some reason I can't begin to
explain, emacs is still used by crontab -e.  More confusing, is that the
problem with crontab not recognizing changes appears to be happening only
with some user accounts.  My own user id and root both exhibit the
erroneous behavior every time, but I did an su to an account name set up
for a service and was able to create and modify it's crontab numerous
times with crontab -e.

This concerns me, and I really want to know why it's happening.  I fear a
bug in some part of my system.

-- 
William E. Kempf




More information about the OLUG mailing list