From owner-freebsd-current@FreeBSD.ORG Thu Nov 21 03:09:37 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D8D3BA4 for ; Thu, 21 Nov 2013 03:09:37 +0000 (UTC) Received: from keus02.synserver.de (www.socialrevolutionworldwide.net [212.40.171.22]) by mx1.freebsd.org (Postfix) with ESMTP id 5536D2CA1 for ; Thu, 21 Nov 2013 03:09:36 +0000 (UTC) Received: by keus02.synserver.de (Postfix, from userid 1000) id 308535429F; Thu, 21 Nov 2013 04:09:21 +0100 (CET) Resent-From: Thomas Keusch Resent-Date: Thu, 21 Nov 2013 04:09:18 +0100 Resent-Message-ID: <20131121030918.GA16298@vs2.gothschlampen.com> Resent-To: freebsd-current@freebsd.org Date: Thu, 21 Nov 2013 04:04:04 +0100 From: "Thomas K." To: Volodymyr Kostyrko Subject: Re: cron(8) improvement Message-ID: <20131121030403.GA11468@vs2.gothschlampen.com> References: <52792B60.1030309@allanjude.com> <52792CF3.9050104@mail.lifanov.com> <1383675687.8053.43379365.3F5A71FC@webmail.messagingengine.com> <527A0468.7020600@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <527A0468.7020600@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Nov 2013 03:09:37 -0000 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