From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from <gentoo-dev+bounces-24779-garchives=archives.gentoo.org@gentoo.org>) id 1I7E1c-0004Wq-FP for garchives@archives.gentoo.org; Sat, 07 Jul 2007 17:24:52 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l67HNFoE025813; Sat, 7 Jul 2007 17:23:15 GMT Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l67HJwQn021138 for <gentoo-dev@lists.gentoo.org>; Sat, 7 Jul 2007 17:19:59 GMT Received: by ug-out-1314.google.com with SMTP id a2so982866ugf for <gentoo-dev@lists.gentoo.org>; Sat, 07 Jul 2007 10:19:58 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=IXrHxtwzLiBRq297bQRROfdVUwxOF/MYKtSqCil1Cl7EMj98oc/rNmrYZqNocptGWAlndAFe3Bg9sCSmDq5RQBxdbty0llrazGGy3uGKg6gorjTQ3PTHWabxSZeHf4OyKRpSDlwvG3yF4S1cJTSEqJ1d79p7G7n/sy0nQHxbk40= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HaTnjqtijdRnqkHb8fDtEs9FOCffDdF3DhaPuML6TWUDeu1CS4VQ4zbCSpcV+EMQCpHWJs2vGvg0tfaA4Pa9eUXbf0Jq8leYD+o21KRoiU3m4sfCG/jBVdAv/Ix6cSq3Slgm7ioPdg+G0RIToX73q5ersW3+GT88I4M64dn/JRk= Received: by 10.78.195.9 with SMTP id s9mr837070huf.1183828798689; Sat, 07 Jul 2007 10:19:58 -0700 (PDT) Received: by 10.78.46.12 with HTTP; Sat, 7 Jul 2007 10:19:58 -0700 (PDT) Message-ID: <2bd962720707071019t643319d8sc78dd288a0f312f0@mail.gmail.com> Date: Sat, 7 Jul 2007 13:19:58 -0400 From: "Ryan Reich" <ryan.reich@gmail.com> To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] Inotify and (f)crontabs In-Reply-To: <2bd962720707070847h2b1084f7lcb5b844fe9b8db70@mail.gmail.com> Precedence: bulk List-Post: <mailto:gentoo-dev@lists.gentoo.org> List-Help: <mailto:gentoo-dev+help@gentoo.org> List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@gentoo.org> List-Subscribe: <mailto:gentoo-dev+subscribe@gentoo.org> List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org> X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2bd962720707010748g6fcb96cfw47a85610aadc9f79@mail.gmail.com> <200707070423.35314.vapier@gentoo.org> <2bd962720707070847h2b1084f7lcb5b844fe9b8db70@mail.gmail.com> X-Archives-Salt: 871c8ae9-d415-4756-809b-71e1b649ef23 X-Archives-Hash: cb2063c16f744fac4ac66222a5a28bac On 7/7/07, Mike Frysinger <vapier@gentoo.org> wrote: > On Sunday 01 July 2007, Ryan Reich wrote: > > This is a small essay on Gentoo's setup for fcron. > > which is troublesome because some of the things here are specific to fcron > (which frankly dont interest me) while others are specific to the cronbase > package which installs `run-crons` (which does interest me as it is a > Gentooism) ... i'll try to pick out only the relevant pieces as you said > yourself, the fcron things should go upstream. I'm sorry you don't care about my fcron criticisms, but that's the cron I use so it's the one I picked on. The problems with check_system_crontabs were only half the point, anyway. > > 2. is implmented by putting the following rules in /etc/crontab: > > 0 * * * * rm -f /var/spool/cron/lastrun/cron.hourly > > 1 3 * * * rm -f /var/spool/cron/lastrun/cron.daily > > 15 4 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly > > 30 5 1 * * rm -f /var/spool/cron/lastrun/cron.monthly > > */10 * * * * /usr/bin/test -x /usr/sbin/run-crons && > > /usr/sbin/run-crons > > whose effect is, at intevals of one hour, day, week, and month, to > > remove some state files for the script run-crons, and also to run said > > script every ten minutes. The purpose of run-crons is to run the > > scripts in /etc/cron.{hourly,...} at the appropriate intervals, thus > > saving me the effort of adding a lot of lines looking like > > 1 3 * * * * some-command > > to my crontab. > > you missed a critical aspect: offline time. the way run-crons is implemented, > if you happen to routinely shut your machine off at the time that the cronjob > is supposed to fire, then the standard you proposed will pretty much never > fire. the run-crons implementation however has a pretty good guarantee that > the periodic crons will get fired at the next uptime opportunity. This point is where your uninterest in fcron puts us at odds. See, fcron allows you to have such commands run at boot, and allows you to schedule commands that run at periods of uptime rather than wall time, so this is not an issue for fcron. And for other crons, there exists anacron, which is recommended precisely for this purpose by Gentoo. The only thing that's accomplished by putting this functionality in run-crons is to duplicate it, awkwardly. > > Furthermore, the files /var/spool/cron/lastrun/cron.* are > > ALREADY handled in the run-crons script itself, so that most of the > > above commands would seem to be redundant. > > this is most likely true. > > > This one also has the > > additional unpleasant property of filling the logs with useless > > messages: > > [fcron] Job /usr/bin/test -x /usr/sbin/run-crons && > > /usr/sbin/run-crons started for user > > systab > > yes, this sucks, but so it goes. So if it sucks, you would approve of an alternative that doesn't exhibit this behavior? -- Ryan Reich -- gentoo-dev@gentoo.org mailing list