From: Frank Steinmetzger <Warp_7@gmx.de>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Bug in run-crons?
Date: Mon, 13 Dec 2021 23:03:10 +0100 [thread overview]
Message-ID: <YbfDHqguSHk77/lA@kern> (raw)
In-Reply-To: <CAGfcS_k0b46LqFwrjGd=Qbg2Mi9TyKtUGYfMMfuJvEcX0yxNqg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2686 bytes --]
Am Mon, Dec 13, 2021 at 04:54:30PM -0500 schrieb Rich Freeman:
> On Mon, Dec 13, 2021 at 4:42 PM Michael Orlitzky <mjo@gentoo.org> wrote:
> >
> > On Mon, 2021-12-13 at 22:38 +0100, Frank Steinmetzger wrote:
> > >
> > > Well I *could* disable run-crons altogether and add entries to fcron’s own
> > > crontab which would run those scripts in /etc/cron.{hourly,daily,...}
> > > instead.
> > >
> > > However, I like predictable times at which those jobs will run. Especially
> > > if one of them is a zfs scrub; the NAS is powered down for weeks, sometimes
> > > months. And when I power it up, it’s for a reason. And that reason usually
> > > is not a scrub, which—at the current zfs fill level—takes 10½ hours.
> > >
> >
> > Why choose fcron then? It sounds like you have the same rationale as I
> > do: "no, I don't want to run the 4am backup job in the middle of the
> > business day just because it wasn't run at 4am."
Fair point.
Fcron has a serialisation feature, so that for instance updatedb and mandb
don’t run at the same time. Me kinda liky.
> fcron is perfectly capable of running jobs at either set times or at
> loosely-defined intervals that are compensated for if the machine is
> off.
Indeed, I can say "@monthly * 0 *" to run a monthly job (like the scrub)
only at night. *pondering*
> Systemd timers can also be set that way, and can also have
> limits put on scheduling (daily nominally at 3AM but allowed between
> 11PM and 5AM or whatever). Obviously the more expressive the crontab
> equivalent is, the more you can tweak it to do what you want it to.
I’ve gotten used to systemd on my Arch-based desktops. But the NAS is still
on good-ol’ openrc. :)
> I'll also note that zfs scrubs checkpoint at shutdown and will
> auto-resume where you leave off.
That’s a nice bit of knowledge.
> If they are involved multiple times
> with the default options I think any attempt to scrub something that
> is already being scrubbed is just a no-op. Obviously if you don't
> want all that IO during the day you'll have to do something more
> clever - you can instruct it to pause and resume so you could have a
> couple of crontab entries and scripts to do just that.
Or, since I am the only user of that system, I could go back to my previous
way: just run the scrub manually every other month or so before I go to bed.
Because then I know that nothing will interfere with it and it won’t
interfere with anything else.
--
Grüße | Greetings | Qapla’
Please do not share anything from, with or about me on any social network.
This message was written using only recycled electrons.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-12-13 22:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-12 18:21 [gentoo-user] Bug in run-crons? Frank Steinmetzger
2021-12-12 18:41 ` Rich Freeman
2021-12-12 19:07 ` Frank Steinmetzger
2021-12-13 20:18 ` Rich Freeman
2021-12-13 21:19 ` Frank Steinmetzger
2021-12-13 21:33 ` Michael Orlitzky
2021-12-13 21:38 ` Frank Steinmetzger
2021-12-13 21:42 ` Michael Orlitzky
2021-12-13 21:54 ` Rich Freeman
2021-12-13 22:03 ` Frank Steinmetzger [this message]
2021-12-13 22:26 ` Wols Lists
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=YbfDHqguSHk77/lA@kern \
--to=warp_7@gmx.de \
--cc=gentoo-user@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