Date: Thu, 21 Nov 2013 04:04:04 +0100 From: "Thomas K." <fwd@gothschlampen.com> To: Volodymyr Kostyrko <c.kworr@gmail.com> Subject: Re: cron(8) improvement Message-ID: <20131121030403.GA11468@vs2.gothschlampen.com> Resent-Message-ID: <20131121030918.GA16298@vs2.gothschlampen.com> In-Reply-To: <527A0468.7020600@gmail.com> References: <52792B60.1030309@allanjude.com> <52792CF3.9050104@mail.lifanov.com> <1383675687.8053.43379365.3F5A71FC@webmail.messagingengine.com> <527A0468.7020600@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 06, 2013 at 10:57:12AM +0200, Volodymyr Kostyrko wrote: > >> > >>Shouldn't we encourage packages to use periodic(8) when possible? > >> > > > >Yes but our default periodic configuration in /etc/crontab is only > >configured to be as granular as daily. If this is something that should > >run hourly or at very strange intervals then cron is a better choice. > > So why we shouldn't add something like: > > 0 * * * * root periodic hourly > @reboot root periodic reboot > > I already do this on some machines to take hourly and boot snapshots > with zfSnap. And I think periodic is much better place for such > tasks. While this is the way it has always been done, I'd find it somewhat lacking in the flexibility department, also you might be in for some nasty surprises First, the resolution is limited to hourly, and second, if I'm not mistaken, the jobs are run strictly sequentially. The last point be suboptimal, as the interval may vary wildly. Also, what happens when all jobs' runtime adds up to more than one hour? It's an equivalent of /etc/cron.hourly.d, but going this way we still don't have something like /etc/crond.d. Best regards Thomas
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131121030403.GA11468>