Date: Mon, 15 Oct 2012 15:21:31 -0700 From: Xin Li <delphij@delphij.net> To: Garrett Cooper <yanegomi@gmail.com> Cc: Ian Lepore <freebsd@damnhippie.dyndns.org>, src-committers@freebsd.org, Pawel Jakub Dawidek <pjd@freebsd.org>, Maxim Sobolev <sobomax@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib Message-ID: <507C8C6B.80707@delphij.net> In-Reply-To: <CAGH67wSATkcsMMFcd3=rkM%2BDZ=g-ke67zeuXd9RZ-=UY_9sdLg@mail.gmail.com> References: <201210150821.q9F8Lobc047576@svn.freebsd.org> <20121015202615.GJ1383@garage.freebsd.pl> <1350333885.1123.153.camel@revolution.hippie.lan> <CAGH67wSATkcsMMFcd3=rkM%2BDZ=g-ke67zeuXd9RZ-=UY_9sdLg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 10/15/12 13:52, Garrett Cooper wrote: > On Mon, Oct 15, 2012 at 1:44 PM, Ian Lepore > <freebsd@damnhippie.dyndns.org> 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. BTW it seems that I need to clean dust on my forever WIP cron update sooner :-/ Cheers, - -- Xin LI <delphij@delphij.net> https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJQfIxrAAoJEG80Jeu8UPuz8AEH/RHsUiCrbjws2GwyNcIn2Qz5 JEkmK4SAvMigIok2JZNyuKtP/6j9wmhk6EtuDLV9s196hdarfBPl/JJcv7x+JM/W OTOtJuh8i59bTNSSUPVUlgEpXXh8I77CfVO3RfadcchCMzkhUuonHGpgqVflYS4n LbjJEbZMrGq7JSat3kjUX6bU+jOb2cA1Ieoe9ykp3vsFZWHFeAimMzPcH/knO/wi M9YgzO4mfuATYUDDcj6Istvm2O3mwsftPwTPCe2RUov5fvWG05InygwqglaYtvx9 e6tKYqbwbd+kVr9ZOLVc9Izk51b3pATDuItYDSXUyI2DW8ymsgvvdk2vOkZfDnQ= =q1rQ -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?507C8C6B.80707>