From owner-svn-src-head@FreeBSD.ORG Mon Oct 15 22:24:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2804419F; Mon, 15 Oct 2012 22:24:29 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id 01B208FC0C; Mon, 15 Oct 2012 22:24:29 +0000 (UTC) Received: from epsilon.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id B9EB41DB49; Mon, 15 Oct 2012 15:24:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1350339868; bh=Tw9CTx5NKO5AjDBSsfcM9qWHHko9HNlSMzUHrQ2XjLM=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=Fd7JvJP+460XHe5ux4rhpeu0mTTdBopNG3FimCEez6YAOSFFR+DRcDEfo0MZt284Z 8E6x9A+g8S1uki3wnHkaM9ZyZ2Ck2ScR24fB6hVekf9MYu5TWl93J/ZuEOwee1hI6+ F2FFHhLHDYKPk3pHieYypLVZ/Fht0TIY8g/QrSw4= Message-ID: <507C8D1C.3000306@delphij.net> Date: Mon, 15 Oct 2012 15:24:28 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: d@delphij.net Subject: Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib References: <201210150821.q9F8Lobc047576@svn.freebsd.org> <20121015202615.GJ1383@garage.freebsd.pl> <1350333885.1123.153.camel@revolution.hippie.lan> <507C8C6B.80707@delphij.net> In-Reply-To: <507C8C6B.80707@delphij.net> X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Ian Lepore , src-committers@freebsd.org, Pawel Jakub Dawidek , Maxim Sobolev , Garrett Cooper , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2012 22:24:29 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 10/15/12 15:21, Xin Li wrote: > On 10/15/12 13:52, Garrett Cooper wrote: >> On Mon, Oct 15, 2012 at 1:44 PM, Ian Lepore >> wrote: >>> On Mon, 2012-10-15 at 22:26 +0200, Pawel Jakub Dawidek wrote: >>>> On Mon, Oct 15, 2012 at 08:21:50AM +0000, Maxim Sobolev >>>> wrote: >>>>> Author: sobomax Date: Mon Oct 15 08:21:49 2012 New >>>>> Revision: 241576 URL: >>>>> http://svn.freebsd.org/changeset/base/241576 >>>>> >>>>> Log: Add per-second scheduling into the cron(8). Right now >>>>> it's only available via the new @every_second shortcut. >>>>> ENOTIME to implement crontab(5) format extensions to allow >>>>> more flexible scheduling. >>>>> >>>>> In order to address some concerns expressed by Terry >>>>> Lambert while discussing the topic few years ago, about >>>>> per-second cron possibly causing some bad effects on >>>>> /etc/crontab by stat()ing it every second instead of every >>>>> minute now (i.e. atime update), only check that database >>>>> needs to be reloaded on every 60-th loop run. This should >>>>> be close enough to the current behaviour. >>>>> >>>>> Add "@every_minute" shortcut while I am here. >>>> >>>> Do I read the code correctly and the cron deamon will wake >>>> up every second now even if @every_second is not used at >>>> all? >>> >>> It appears to, which I don't think is a bad thing at all. But >>> the way it waits is to wake up, do some work, and go back to >>> sleep for an integer 1 second. That will occasionally lead to >>> a second in which no wakeup happens, as the "do some work" >>> part always takes some fraction of a second. > >> This is silly. It should be waking up at the lowest common >> denominator of time quanta, not every second; this could be >> determined via the crontab its managing. > > This will break crontab change detection -- instead of pickup the > change in a minute, now you end up with the smallest common > divisor. *greatest > BTW it seems that I need to clean dust on my forever WIP cron > update sooner :-/ > > Cheers, > - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJQfI0cAAoJEG80Jeu8UPuz4awH/jO2L6/aA7ocMQYGaT+epiOg XqfbhcnvmzI5X1Fgjx5rJI+B8bO2r9HCcuvwYq3RFRPdEUQPG3HGHKWnYACV6Sz2 Zkjx+mks0GdB413W5A2aX09BHe/9bT7aZ01SvHppvMkILuXn0tXJtaNE4YB7S8Df r1idCHX0hJnJl4WHqUl/AndKMtx1Nh2AfrlwubLc1W4XyTkPXMv1v2FZ3OjtgUJy byEnQZIISuSHE9S8rExCJdYUzkuwEZAMijc4v32e+2ZYFyvIYVdS1hiujnrmoIxm gCE/ZV8G4VGq8MX2/4FGGfQLetWelZCm9ogJaPpGvhfCY6PU8GUj5Ovs7pkzSA4= =IurG -----END PGP SIGNATURE-----