[Techtalk] crontab vs vi

Julie jockgrrl at austin.rr.com
Sun Jan 13 02:16:42 EST 2002


gabrielle wrote:
> 
> >Message: 4
> >Date: Fri, 11 Jan 2002 18:10:06 -0800
> >From: Laurel Fan <laurel at sdf.lonestar.org>
> >
> >The manpage for crontab on my solaris box says:
> >            Note  that all crontab jobs should be
> >            submitted using crontab; you should not  add  jobs  by
> >            just editing the crontab file because cron will not be
> >            aware of changes made this way.
> 
> OK, all is clear now.  Solaris doesn't automatically re-read the cron
> file--I was stopping and restarting crond if I had an edit (is that a bad
> thing to do?).  If I use crontab, I don't have to mees with the daemon.  I
> had a problem with syntax once (not enough fields) and crond just sent me a
> very nice error message.  I guess I've just been really lucky not to have
> any other problems--my linux boxes never batted an eyelid (?) when I used
> vi either.

Yes, stopping and then restart crond is potentially a Very Bad
Thing.

Cron runs jobs on a periodic basis.  In that regard it is unlike
"at" which runs jobs at and after a specified time, even if "atd"
is started after the job was scheduled to run.  "crond" doesn't
go back and figure out if it missed a job.  So if you stop "crond"
just before a job was to be run, and then you restart it a few
minutes later after the job was to be run, that job will never
be executed.
-- 
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