From owner-freebsd-current@FreeBSD.ORG Thu Nov 7 12:11:09 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 997D911D for ; Thu, 7 Nov 2013 12:11:09 +0000 (UTC) (envelope-from kpaasial@gmail.com) Received: from mail-qa0-x235.google.com (mail-qa0-x235.google.com [IPv6:2607:f8b0:400d:c00::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5BFE2288A for ; Thu, 7 Nov 2013 12:11:09 +0000 (UTC) Received: by mail-qa0-f53.google.com with SMTP id k4so323476qaq.5 for ; Thu, 07 Nov 2013 04:11:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=vdIFfBqqoFC4KG9O+BMie9fPDgBFvHnC8rE2b9GT1Eg=; b=gzQS3J5zJb1u5ST4vwnAew0v1G//lWvLxT7gHSv3hObkU5x0avfpXDQ/oVu7b/maBR fQkKhBeYVbhkshdZYBtdULxXvTMdDthDjKJVSjnBDDc562rkHBPs4dE4aX6ygn2bGtID 1TvM2LlEeXVcj29T5jo9JbhNekRy2+t3UDCuEfSAbO4qUcZfCzj11gWkvSYixgC47lEl 2lJLbRW1+vpoyl3qI9ntRZQtDpYBzzln4JKgztmytTjbZk6md7KxyStEgx850mLV70P0 ON25VpGoiwz+A+5yoOrPDHnAnUpQs15SBWpvxFs7yjx+jbpKdo4+FD618zKFDMrHodCt 6mdg== MIME-Version: 1.0 X-Received: by 10.229.223.194 with SMTP id il2mr12168238qcb.6.1383826268545; Thu, 07 Nov 2013 04:11:08 -0800 (PST) Received: by 10.96.180.233 with HTTP; Thu, 7 Nov 2013 04:11:08 -0800 (PST) In-Reply-To: References: <52792B60.1030309@allanjude.com> <488180AE-5C23-402A-BAA4-E3263D8C52BF@kientzle.com> <1383788977.14448.44112617.6F0D61A0@webmail.messagingengine.com> <527AFAA1.1040001@allanjude.com> Date: Thu, 7 Nov 2013 14:11:08 +0200 Message-ID: Subject: Re: cron(8) improvement From: Kimmo Paasiala To: Lyndon Nerenberg Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD current 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 12:11:09 -0000 On Thu, Nov 7, 2013 at 6:43 AM, Lyndon Nerenberg wrote: > > 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 per d= ay, once per week, once per month. It doesn't deal with tasks that need to= be fired off at arbitrary intervals. > > As you say, it could be adapted to run things with per-minute granularity= , but it wouldn't scale well. For per-minute granularity you would have to= fire off a periodic run every minute. That's five times the rate that atr= un(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 shell 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