From owner-freebsd-current@FreeBSD.ORG Thu Nov 7 03:49:39 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B5653639 for ; Thu, 7 Nov 2013 03:49:39 +0000 (UTC) (envelope-from kpaasial@gmail.com) Received: from mail-qa0-x233.google.com (mail-qa0-x233.google.com [IPv6:2607:f8b0:400d:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 773EB26B8 for ; Thu, 7 Nov 2013 03:49:39 +0000 (UTC) Received: by mail-qa0-f51.google.com with SMTP id hu16so21673qab.10 for ; Wed, 06 Nov 2013 19:49:38 -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; bh=TIl63Fz94kX/wfycqfBt2+eFc2dNj92MhsrZS8V+55w=; b=WDLqkj6X13/630guBuvGNGlqsVsvJjI82ob7YHEfi1FOkyII7lb8BozlYrjJcYNPdi IXhxfjcVuYd9tejXNv1iaw06HFHVleenCIxGvQlSRKuoZDe2sc9xN6w5l9BbzgXsp/LC 6wqEdfe9zI/n1Glt76Awrsf5Awu+ujtlktTzb0BHqXanQsc9qGIAv84sHirlpf2fxBrw BtIWCTPcHP1L0YYGdawvEMz7LbZn9P8qwSmKH6sKg+SWEsFR8cu+xFlGGUmafekm0mRB xPTtDRnADJrh74vgqPkVFiwSr0XyCAhC72XY0XFJGnq5huy9OfI1sMq1PYUGU1Q04F0H wQWw== MIME-Version: 1.0 X-Received: by 10.224.167.84 with SMTP id p20mr10272354qay.97.1383796178645; Wed, 06 Nov 2013 19:49:38 -0800 (PST) Received: by 10.96.180.233 with HTTP; Wed, 6 Nov 2013 19:49:38 -0800 (PST) In-Reply-To: <527AFAA1.1040001@allanjude.com> 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 05:49:38 +0200 Message-ID: Subject: Re: cron(8) improvement From: Kimmo Paasiala To: Allan Jude Content-Type: text/plain; charset=UTF-8 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 03:49:39 -0000 On Thu, Nov 7, 2013 at 4:27 AM, Allan Jude wrote: > On 2013-11-06 20:49, Mark Felder wrote: >> >> On Wed, Nov 6, 2013, at 18:21, Tim Kientzle wrote: >>> On Nov 5, 2013, at 9:31 AM, 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. >>> This is a good idea. We should do it. >>> >>> How and if this facility gets used is a separate question. >>> >>> "Tools, not policy." >>> >>> Support for a cron.d directory is a tool that can be >>> used in many ways. The policy of how it should be >>> used is a separate discussion. (For example, whether >>> or not ports or packages should install crontab files into >>> /usr/local/etc/cron.d/ can be richly debated after that >>> directory exists.) >>> >> Ok, so we create that directory. Now nobody can use it in a port until >> FreeBSD 8.4 is EoL -- approximately June 30, 2015. >> >> We should be using the existing cron tabs directory *now*. We can't >> easily force older versions of FreeBSD to update their cron software or >> configuration to support that new directory. >> >> I'm not saying we shouldn't create it, just that we can't effectively >> use it for 2 years. >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > My use case is less about packages, and more about puppet, ansible etc. > Puppet relies on these hideously large markers in the crontab files to > programmatically add/remove crons, whereas a cron.d directory could be > done nice and clean > > And in that case, the fact that it is not supported on 8.x does not > bother me. > > -- > Allan Jude > > 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. Also periodic already has support for ports installing their own jobs under /usr/local/etc/periodic.d that can be enabled/disabled in periodic.conf. -Kimmo