Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jan 1997 21:15:22 -0500 (EST)
From:      Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
To:        ponds!freefall.cdrom.com!freebsd-hackers
Subject:   Re: cron problems in 2.1.6.1 (not signaling crond of a change in a cron
Message-ID:  <199701190215.VAA01388@lakes.water.net>

next in thread | raw e-mail | index | archive | help
> As Thomas David Rivers wrote:
> 
> > My question is this:  When a new crontab entry is installed in the
> > system, should you have to do something to crond to get it recognized?
> 
> It should be picked up automatically based on the modification
> timestamp of the crontab file:
> 
> 	u = find_user(old_db, fname);
> 	if (u != NULL) {
> 		/* if crontab has not changed since we last read it
> 		 * in, then we can just use our existing entry.
> 		 */
> 		if (u->mtime == statbuf->st_mtime) {
> 			Debug(DLOAD, (" [no change, using old data]"))
> 			unlink_user(old_db, u);
> 			link_user(new_db, u);
> 			goto next_crontab;
> 		}
> 
> -- 
> cheers, J"org
> 

 Aha!  That's what didn't work - apparently.  

 find_user() appears to only look for existing users.  If you're
adding a brand-new user crontab; it seems to be broken.

 I did see the appropriate readdir() on "tabs" - which eventually
worked its way down to the code you quote... looks reasonable to me
as well.

 I've just noted that it doesn't work :-)

 It's not a bigee - as a restart of cron fixes the problem, if I get
time I'll try and debug it and see what's going on.

	- Dave Rivers -




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