public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ryan Reich" <ryan.reich@gmail.com>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Inotify and (f)crontabs
Date: Sat, 7 Jul 2007 13:19:58 -0400	[thread overview]
Message-ID: <2bd962720707071019t643319d8sc78dd288a0f312f0@mail.gmail.com> (raw)
In-Reply-To: <2bd962720707070847h2b1084f7lcb5b844fe9b8db70@mail.gmail.com>

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



  parent reply	other threads:[~2007-07-07 17:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-01 14:48 [gentoo-dev] Inotify and (f)crontabs Ryan Reich
2007-07-01 17:07 ` [gentoo-dev] " Daniel Schömer
2007-07-01 17:30   ` Ryan Reich
2007-07-01 19:20     ` [gentoo-dev] " Daniel Schömer
2007-07-04 17:19       ` Ryan Reich
2007-07-04 20:58         ` [gentoo-dev] " Daniel Schömer
2007-07-06  8:39         ` [gentoo-dev] Re: " Steve Long
2007-07-07 15:36           ` Ryan Reich
2007-07-09 21:43             ` Ryan Reich
2007-07-10  0:35               ` Robert Buchholz
2007-07-07  8:23 ` [gentoo-dev] " Mike Frysinger
     [not found]   ` <2bd962720707070847h2b1084f7lcb5b844fe9b8db70@mail.gmail.com>
2007-07-07 17:19     ` Ryan Reich [this message]
2007-07-07 18:13   ` Peter Gordon
2007-07-08  3:21     ` Mike Frysinger
2007-07-08  4:07       ` Ryan Reich
2007-07-08  4:22         ` Mike Frysinger
2007-07-08 10:46           ` [gentoo-dev] " Steve Long
2007-07-08 13:43             ` Ryan Reich
2007-07-08 13:50           ` [gentoo-dev] " Ryan Reich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2bd962720707071019t643319d8sc78dd288a0f312f0@mail.gmail.com \
    --to=ryan.reich@gmail.com \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox