From owner-freebsd-current@FreeBSD.ORG Wed Nov 6 08:57:20 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 A5E17801; Wed, 6 Nov 2013 08:57:20 +0000 (UTC) (envelope-from c.kworr@gmail.com) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 024232C6E; Wed, 6 Nov 2013 08:57:19 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id ec20so2155173lab.30 for ; Wed, 06 Nov 2013 00:57:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ZOAN16qgMPOBMgVZp+qKOcgqiRdBAKIkt+zQX7g/wMY=; b=GLxwcldqnYkOGqSi/ZsNhEGBK2hj4kPbgaM+G3cMhC+ChM/Rb3/a5s9Bfbp5V7VlO8 tlO/LUwDZ3hBNN3dWzAlQQAyTxu9qna8fm3Cy7Oy8aQ2zdQQ83RhjNpHFivXNPQgpSMd 5RNrLOsBW22MahAuYQf9sLK8vjfhk58+JDrjv57Xh7iAS/FAJDFMhOvGlLO8BmGNE/YD fh9xIs5sxv/zLL3ZsgEfqI+jfP24y2KjZaCoZnqmH1l3tWEs1jx2O86wP26DoQl8zZuF usjb32Si2MTCKH32k4Qj59lpy6t8IE/rW7+nj7EDIbwtxa2pBZ84yoDKYqO2DyfNRrjj OI9w== X-Received: by 10.112.138.164 with SMTP id qr4mr140849lbb.49.1383728238122; Wed, 06 Nov 2013 00:57:18 -0800 (PST) Received: from [192.168.1.129] (mau.donbass.com. [92.242.127.250]) by mx.google.com with ESMTPSA id x7sm29449034lad.7.2013.11.06.00.57.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Nov 2013 00:57:17 -0800 (PST) Message-ID: <527A0468.7020600@gmail.com> Date: Wed, 06 Nov 2013 10:57:12 +0200 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Mark Felder , freebsd-current@freebsd.org Subject: Re: cron(8) improvement References: <52792B60.1030309@allanjude.com> <52792CF3.9050104@mail.lifanov.com> <1383675687.8053.43379365.3F5A71FC@webmail.messagingengine.com> In-Reply-To: <1383675687.8053.43379365.3F5A71FC@webmail.messagingengine.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 06 Nov 2013 08:57:20 -0000 05.11.2013 20:21, Mark Felder wrote: > > > 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. 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. -- Sphinx of black quartz, judge my vow.