From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 25 08:42:26 2011 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 1C3791065675 for ; Fri, 25 Nov 2011 08:42:26 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id B98EC14FF8E; Fri, 25 Nov 2011 08:42:25 +0000 (UTC) Message-ID: <4ECF54F1.50203@FreeBSD.org> Date: Fri, 25 Nov 2011 00:42:25 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Cy Schubert References: <201111250812.pAP8ClDw011348@slippy.cwsent.com> In-Reply-To: <201111250812.pAP8ClDw011348@slippy.cwsent.com> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Jason Hellenthal , hackers@FreeBSD.org Subject: Re: cron(8) mis-feature with @reboot long after system startup X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2011 08:42:26 -0000 On 11/25/2011 00:12, Cy Schubert wrote: > In message <20111125070241.GA7915@DataIX.net>, Jason Hellenthal writes: >> List, >> >> When using @reboot with cron you expect your proccesses to always start when >> the system boots up and only when the system boots. But long after the system >> in question had been booted, my @reboot processes ran again! after a (/etc/r >> c.d/cron restart). This is normally fine and dandy until one of your @reboot >> jobs needs to contain a process that purges files "files that are already in >> use by a running daemon since the system has not rebooted" and becomes hazard >> ous. >> >> So with that said... is there a way we could actually make this run @reboot o >> nly ? >> >> Compare the system boottime (kern.boottime) to the current time and if it is >> greater than ?5 minutes? do not run on any @reboot's ? or add yet another ext >> ension @boottime so it does not throw off current functionality ? >> >> Surely I could modify the scripts which do this but I find it unproductive an >> d counter intuitive for the need to explain that @reboot means "When cron is >> restarted" even though the name means something completely opposite. > > I don't see how cron could run reboot jobs again while running. It calls > run_reboot_jobs only during startup. Could it be possible that cron died on > your system and you restarted it? Please read the OP again carefully. -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/