From owner-freebsd-questions@FreeBSD.ORG Sat Dec 7 23:06:28 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C40B3F3C for ; Sat, 7 Dec 2013 23:06:28 +0000 (UTC) Received: from know-smtprelay-omc-3.server.virginmedia.net (know-smtprelay-omc-3.server.virginmedia.net [80.0.253.67]) by mx1.freebsd.org (Postfix) with ESMTP id 36B791065 for ; Sat, 7 Dec 2013 23:06:27 +0000 (UTC) Received: from amd.asgard.uk ([92.238.71.115]) by know-smtprelay-3-imp with bizsmtp id yn6L1m00a2VE8Jc01n6L1N; Sat, 07 Dec 2013 23:06:21 +0000 X-Originating-IP: [92.238.71.115] X-Spam: 0 X-Authority: v=2.1 cv=HNhNF+dv c=1 sm=1 tr=0 a=kgu37eZCuzjHC/BLjkfnNA==:117 a=kgu37eZCuzjHC/BLjkfnNA==:17 a=mSnCZvPJBnkA:10 a=g8DGSEr-gRIA:10 a=z6OmtuC8ihAA:10 a=8nJEP1OIZ-IA:10 a=U4kjxnpeAAAA:8 a=RIXHdJ6alCwA:10 a=vOxnJDo9JYcGHPkSP2MA:9 a=wPNLvfGTeEIA:10 From: dgmm To: freebsd-questions@freebsd.org Subject: Re: System reboots ~3am during daily periodic 450.status-security run Date: Sat, 7 Dec 2013 23:06:17 +0000 User-Agent: KMail/1.13.7 (FreeBSD/9.1-RELEASE-p7; KDE/4.10.5; amd64; ; ) References: <201312012352.01075.freebsd01@dgmm.net> <201312050008.54995.freebsd01@dgmm.net> <20131205134142.3d6ad8d5@gumby.homeunix.com> In-Reply-To: <20131205134142.3d6ad8d5@gumby.homeunix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201312072306.18148.freebsd01@dgmm.net> X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 23:06:28 -0000 On Thursday 05 December 2013 13:41:42 RW wrote: > On Thu, 5 Dec 2013 00:08:54 +0000 > > dgmm wrote: > > On Tuesday 03 December 2013 23:55:44 Shane Ambler wrote: > > > On 03/12/2013 22:14, dgmm wrote: > > > > On Tuesday 03 December 2013 09:48:04 krad wrote: > > > >> or you could use the @reboot option, that would mean it always > > > >> runs at crons start, which may not be what you want, > > > > > > > > Yes, that was my first thought but the overheads at boot time > > > > might be inconvenient although I'll try it to find out. > > > > > > Or write a rc script to run it at shutdown? > > > > Thanks. That's the answer I was looking for. There's no downside. > > Be aware that shutdown runs under a timeout. Ah, I didn't know that. Although on reflection it's obvious really. > IIWY I'd install anacron, it a tiny binary, and it's designed for the > problem you have. I'll run any number of tasks with arbitrary > periodicity (in days), so it'll handle weekly and monthly scripts as > well. It uses locking so you can run it from rc.d, cron or manually > without having to worry about races. It can run it's tasks with > staggered delays or serialize them. Thanks.