System reboots ~3am during daily periodic 450.status-security run

RW rwmaillists at googlemail.com
Thu Dec 5 13:41:48 UTC 2013


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.  



More information about the freebsd-questions mailing list