[Techtalk] crontab vs vi

Val Henson val at nmt.edu
Fri Jan 11 18:19:05 EST 2002

Not a definitive answer but an informed guess...

If crontab starts while you're still editing the file, or worse, while
you've saved a half-finished crontab file, unexpected and possibly
very bad things will happen.  I'm assuming that crontab -e tells
crontab not to attempt to run the file being edited, although the man
page doesn't state that explicitly.

Working with SMP systems so much immediately made me recognize this as
a potential concurrency/synchronization/clock problem.

By the way, I still remember when I was in the "superstition" phase of
computer knowledge - you don't know why somehting is bad, but you know
it's bad!  Good for you for trying to figure out why.  A lot of these
superstitions are left over from earlier systems and no longer apply.

-VAL (who will be leaving techtalk again pretty soon)

On Fri, Jan 11, 2002 at 03:54:49PM -0800, gabrielle wrote:
> Hi everyone.
> I work with linux and Solaris at work.  Recently I was working on something 
> with one of the sysadmins (I'm not technically part of that group, but they 
> let me manage my own boxes) and had to alter a cron file.  I have always 
> used vi to do this.
> Well...the guy who was helping me had a tizzy.  "Never use vi to edit 
> that!  Always use crontab!"  I told him I'd always done it this way and 
> never had any problems, and would he care to shed any light on his 
> reasoning behind that statement, but he couldn't tell me.  He just said 
> "You're not supposed to!"  I have since learned from another sysadmin 
> friend that this may be the case for SCO, but it's certainly not an issue 
> for linux or solaris.  However, he couldn't really tell me why either.
> So, not being satisfied with a "because I said so" type of answer, I am 
> turning to the LinuxChix.
> Yes, I 'man crontab' and googled, but couldn't find an answer.  Pointers to 
> a FM are much apprectiated.
> gabrielle
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://www.linuxchix.org/mailman/listinfo/techtalk

More information about the Techtalk mailing list