Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Jan 2000 19:33:54 -0500
From:      Mitch Collinsworth <mkc@Graphics.Cornell.EDU>
To:        Ryan Thompson <freebsd@sasknow.com>
Cc:        Ben Smithurst <ben@scientia.demon.co.uk>, Pekka Savola <Pekka.Savola@netcore.fi>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Huge crontab jobs are not run 
Message-ID:  <200001030033.TAA07780@benge.graphics.cornell.edu>
In-Reply-To: Message from Ryan Thompson <freebsd@sasknow.com>  of "Sun, 02 Jan 2000 18:05:10 CST." <Pine.BSF.4.10.10001021748190.34858-100000@sasknow.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

>> > Did you kill -HUP cron?  If you didn't do this (or reboot the system),
>> > your job won't run.  
>> 
>> According to the manpage, you don't need to:
>> 
>> | Additionally, cron checks each minute to see if its spool directory's
>> | modtime (or the modtime on /etc/crontab) has changed, and if it has, cron
>> | will then examine the modtime on all crontabs and reload those which have
>> | changed.  Thus cron need not be restarted whenever a crontab file is mod-
>> | ified.  Note that the crontab(1) command updates the modtime of the spool
>> | directory whenever it changes a crontab.
>
>Hmm... I stand corrected :-)  I haven't looked at than man page for quite
>some time.  Anyway, kill -HUP can't hurt, and might actually kick a few 
>things into shape if modtimes get set incorrectly :-)
>
><ASIDE> 
> Isn't checking all crontabs every minute kind of a waste of good
> resources in many cases?

I guess you *still* haven't looked at cron(8) in quite some time.  It
also states that the every minute check is done on the modtime of the
directory containing the per-user crontabs and the individual files
are only checked if the directory modtime has changed.  So in the
typical nothing-has-changed case, only two checks are done, one on
/etc/crontab and one on the spool directory.

Anything else we can read to you?  :-)

-Mitch


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001030033.TAA07780>