From owner-freebsd-current@FreeBSD.ORG Thu Nov 7 17:14:03 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 ESMTP id 4598B8C7 for ; Thu, 7 Nov 2013 17:14:03 +0000 (UTC) (envelope-from freebsd@allanjude.com) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id F30DA2EE4 for ; Thu, 7 Nov 2013 17:14:01 +0000 (UTC) Received: from [10.1.1.1] (S01060001abad1dea.hm.shawcable.net [50.70.108.129]) (Authenticated sender: allan.jude@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id A6AFE45B04 for ; Thu, 7 Nov 2013 17:13:59 +0000 (UTC) Message-ID: <527BCA55.2000207@allanjude.com> Date: Thu, 07 Nov 2013 12:13:57 -0500 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: Re: cron(8) improvement References: <52792B60.1030309@allanjude.com> <488180AE-5C23-402A-BAA4-E3263D8C52BF@kientzle.com> <1383788977.14448.44112617.6F0D61A0@webmail.messagingengine.com> <527AFAA1.1040001@allanjude.com> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DnHM8Tkr8AJUMiQvxcwLKR1qawdx5IvGT" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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, 07 Nov 2013 17:14:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --DnHM8Tkr8AJUMiQvxcwLKR1qawdx5IvGT Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2013-11-07 07:11, Kimmo Paasiala wrote: > On Thu, Nov 7, 2013 at 6:43 AM, Lyndon Nerenberg wr= ote: >> On Nov 6, 2013, at 7:49 PM, Kimmo Paasiala wrote:= >> >>> What's wrong with using the existing tools for achieving the same >>> effect? Periodic can be adapted to do exactly what you're describing >>> as noted above by adding an hourly (even minutely? :D ) periodic run.= >> Periodic is geared towards periodic system maintenance tasks. Once pe= r day, once per week, once per month. It doesn't deal with tasks that ne= ed to be fired off at arbitrary intervals. >> >> As you say, it could be adapted to run things with per-minute granular= ity, but it wouldn't scale well. For per-minute granularity you would ha= ve to fire off a periodic run every minute. That's five times the rate t= hat atrun(8) kicks off at. That's a lot of overhead for small, embedded,= or power constrained systems. And to get the time-granularity cron has,= you would have to re-implement cron(8)s dispatch control as a set of she= ll functions. That's just silly. >> >> >> --lyndon >> >> > Well ok, I get your point. I guess there's no other option than to add > support for a cron.d directory for crontab -snippets. I'd however like > to emphasize one thing that has been noted already: > > - Snippets installed by ports should be disabled by default and > enabled only selectively by variables in rc.conf(5) or some other > configuration file to mirror what periodic(8) is doing now. This is > an absolute must because having them enabled by default is a recipe > for disaster. Compare this to services installed by ports, none of > them are enabled by default. > > -Kimmo > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.o= rg" Right. The best way to handle this is likely to have the ports install the example cron to ${PREFIX}/share/portname/ or wherever else they normally put examples, with instructions in the pkg-message on how to enable the cron. The same way that ports that add something to apache don't install to the apache etc/apache22/Includes/ directory, but instead tell you to add the lines to a file there. --=20 Allan Jude --DnHM8Tkr8AJUMiQvxcwLKR1qawdx5IvGT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSe8pYAAoJEJrBFpNRJZKfZYwP/jYTHqJGg1vdgtSKqJj4RnMb ijSizyF7OxSiJQHUCGLxySMd5yzSlMM7mdD3U7t1WYRwvxnIDTWm2hdOWespiQqb 1tX0B5KcR8jOH12XgzHNi7U7nOCPFbRPCfANLZYv2SRFY7WPph/Hi1y0qo4ZQWAw 4bVwoEOxG6Ezo0NKVba34xjcTlOYOYLoqq9vnzQH0ka1n+Of6lKCKm18gi+FcgWm BgP0/he49/SjLhZdfrzxnsNiyqTauWr3xTD16G8R9YwhOtkmgSvrRQ4EyPjO0xMh 76ollQHKzBi5LlxgZ5afxiTKDoffM10eXBJyKH3Uz24OoL7OOS2/YERUSXzahbNa gf15eoMl4A1v/j+GRMA+wmATZlq6kPdRKB0NSNLqSdqyD/8nEONuHPLSI+sToMzU 3tj13dRKwKkeu2m71VQYSsotq9ShM4Ydrtp2ExtYgyBx6OkOjyYW8cvlzEjCNolp LXtC4sKG6RO6nlALq5z54o+DXpM+EdYeUxSjIiL3e1CAKBWFBO5bhFMKNAN20jSa ig4S2XFyEBQbF18MipvxNILaqAqO8mlUv0qXGH1ZzTh9MkIj+JxujOnvjSROGhkq oO8UhPADMCBWtuyQJDvsmMSfKK7V13HQLRCB/Yw+/64UbgII+aKEJwhI7Xem3cYy eL/eAE7+xE8OgSoJDVP2 =h2a4 -----END PGP SIGNATURE----- --DnHM8Tkr8AJUMiQvxcwLKR1qawdx5IvGT--