Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 2013 13:41:42 +0000
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: System reboots ~3am during daily periodic 450.status-security run
Message-ID:  <20131205134142.3d6ad8d5@gumby.homeunix.com>
In-Reply-To: <201312050008.54995.freebsd01@dgmm.net>
References:  <201312012352.01075.freebsd01@dgmm.net> <201312031144.40570.freebsd01@dgmm.net> <529E6F80.7050705@ShaneWare.Biz> <201312050008.54995.freebsd01@dgmm.net>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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.

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.  




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20131205134142.3d6ad8d5>