Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Nov 2013 06:45:43 -0600
From:      Mark Felder <feld@FreeBSD.org>
To:        Volodymyr Kostyrko <c.kworr@gmail.com>, freebsd-current@freebsd.org
Subject:   Re: cron(8) improvement
Message-ID:  <1383741943.17255.43784709.76CF70FB@webmail.messagingengine.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 6, 2013, at 2:57, Volodymyr Kostyrko wrote:
> 05.11.2013 20:21, Mark Felder wrote:
> >
> >
> > On Tue, Nov 5, 2013, at 11:37, Nikolai Lifanov wrote:
> >> On 11/05/13 12:31, Allan Jude wrote:
> >>> This came up in discussion on IRC and I thought I should throw it at the
> >>> list so I don't forget.
> >>>
> >>> A user was asking how to do what linux cron does, where there is a
> >>> directory /etc/cron.d/ that packages and add files to to create crontabs.
> >>>
> >>> Making FreeBSD's cron (Vixie Cron) include /etc/cron.d/ and
> >>> /usr/local/etc/cron.d/ in the /etc/crontab format seems like a very
> >>> useful feature, especially for pkg(8) as it makes it easy and safe to
> >>> programatically add and remove crontabs as part of a package.
> >>>
> >>>
> >>
> >> 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.
> 

Submit a PR and a patch and maybe it can slip in to 10.0-RELEASE.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1383741943.17255.43784709.76CF70FB>