Re: cron(8) improvement

From: Thomas K. <fwd_at_gothschlampen.com>
Date: Thu, 21 Nov 2013 04:04:04 +0100
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
> _at_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
Received on Thu Nov 21 2013 - 02:09:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:44 UTC