From: Rich Freeman <rich0@gentoo.org>
To: gentoo-dev <gentoo-dev@lists.gentoo.org>
Subject: Re: [gentoo-dev] rfc: cron.* and modern cron implementations
Date: Sat, 2 Mar 2019 21:01:49 -0500 [thread overview]
Message-ID: <CAGfcS_=fQ21Xm1Q0QNq6-o=CuRC+4TXX4DmMUASJQgSY6jSimg@mail.gmail.com> (raw)
In-Reply-To: <48d49f64-0fe6-af86-9fe8-5f754371b489@gentoo.org>
On Sat, Mar 2, 2019 at 8:25 PM Michael Orlitzky <mjo@gentoo.org> wrote:
>
> Using run-parts in /etc/crontab also has its problems, but I don't have
> a solution handy for that one. Using run-parts runs those daily, weekly,
> etc. jobs as root, which may not be what you want if you're operating on
> user-controlled data (e.g. bug 662438). The best way to solve this would
> be to let packages install their own crontab entries into a directory
> like /etc/cron.d, but that location isn't standard.
>
So, the problem with cron.d is that you're now using crontab syntax,
and for compatibility you have to use the lowest common denominator
which is vixie.
That means your jobs are STILL running as root, so the only problem
you had with run-parts isn't solved.
In addition you lose the ability to cover the desktop use case of
non-24x7 systems running infrequent tasks. If you used vixie cron
syntax for a monthly job it might never run at all on a typical
desktop, as it would have one opportunity to run in a month, at one
time of day.
The crontab syntax also forces each package maintainer to pick the
time of day their jobs run at, vs just letting the sysadmin choose the
time the entire set of scripts is run.
I'm sure there are alternatives like adding a compatibility layer
(which is basically what run-crons already is), or some kind of helper
where an ebuild can give it a set of parameters and it installs the
task for whatever cron implementation eselect points it at. I'm just
not sure that they are worth the complexity or provide much more value
than the existing solutions. This is also somewhat orthogonal to
run-crons, where you still are left with the choice around whether to
use it with vixie or other implementations that don't support more
desktop-oriented use cases.
This is of course why that bug has been fairly intractable.
--
Rich
next prev parent reply other threads:[~2019-03-03 2:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-03 0:05 [gentoo-dev] rfc: cron.* and modern cron implementations William Hubbs
2019-03-03 0:26 ` Michael Orlitzky
2019-03-03 0:44 ` Rich Freeman
2019-03-03 1:25 ` Michael Orlitzky
2019-03-03 2:01 ` Rich Freeman [this message]
2019-03-03 15:18 ` Michael Orlitzky
2019-03-03 0:27 ` Rich Freeman
2019-03-03 9:26 ` Toralf Förster
2019-03-03 15:00 ` Ralph Seichter
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='CAGfcS_=fQ21Xm1Q0QNq6-o=CuRC+4TXX4DmMUASJQgSY6jSimg@mail.gmail.com' \
--to=rich0@gentoo.org \
--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