[Techtalk] crontab vs vi

Julie jockgrrl at austin.rr.com
Fri Jan 11 21:13:37 EST 2002


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.

On some versions of UNIX, "crontab" notifies "cron" by way of
a FIFO file that a crontab has been modified.  Other versions
of "cron" stat() the files on a regular basis.  For systems
which support user-defined crontab files (which isn't all of
them, by the way ...), reading the crontab directory every
minute can become a performance problem.

So I think the answer is "if you don't know how your cron works,
stick with crontab".
-- 
Julianne Frances Haugh             Life is either a daring adventure
jockgrrl at austin.rr.com                 or nothing at all.
					    -- Helen Keller



More information about the Techtalk mailing list