From owner-freebsd-current@FreeBSD.ORG Tue Nov 5 18:21:30 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 E18C7E17 for ; Tue, 5 Nov 2013 18:21:30 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B58F72C0E for ; Tue, 5 Nov 2013 18:21:30 +0000 (UTC) Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 92B4722174 for ; Tue, 5 Nov 2013 13:21:27 -0500 (EST) Received: from web3 ([10.202.2.213]) by compute5.internal (MEProxy); Tue, 05 Nov 2013 13:21:28 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=smtpout; bh=/t4qcJmESoLBP52yKpLYlzj0Od8=; b=iXj 4M3WzTJfo/sg+jZtiLJh5knYZ0Rofae+ZKigMMEc+hLkrlakj951pKl6M6obdlOf HRFc66OsF84FDAhA8G7gTc3azsQW+YDXBt/Njt1ryyxWFgzur++YO744qx+4X/mj q0JysQ+/yZAabZySH6kL17yZQ1ewxEYtyjz9JSjw= Received: by web3.nyi.mail.srv.osa (Postfix, from userid 99) id 378FF111173; Tue, 5 Nov 2013 13:21:27 -0500 (EST) Message-Id: <1383675687.8053.43379365.3F5A71FC@webmail.messagingengine.com> X-Sasl-Enc: dssdnOFwFWSFglRnu+i9s3QEEvw4u58CHQ/ga1pUtbj/ 1383675687 From: Mark Felder To: freebsd-current@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-d4893488 In-Reply-To: <52792CF3.9050104@mail.lifanov.com> References: <52792B60.1030309@allanjude.com> <52792CF3.9050104@mail.lifanov.com> Subject: Re: cron(8) improvement Date: Tue, 05 Nov 2013 12:21:27 -0600 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: Tue, 05 Nov 2013 18:21:30 -0000 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. If the application is installing its own user they could install their own crontab file in /var/cron/tabs. I'm certain I've seen a couple ports do this.