[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cron, anacron, cronie, systemd-timers



On Mon, 29 Jul 2019 19:13:15 +0100, Simon McVittie <smcv@debian.org>
wrote:
>On Sun, 07 Jul 2019 at 17:00:53 +0200, Marc Haber wrote:
>> And on the third side, we have systemd timers, which are not suited as
>> a complete replacement. There is code to transform crontab entries into
>> systemd timer units, but functionality that cron delivers, such as
>> in-sequence execution of the cron.{daily|weekly|monthly} jobs and the
>> ability to send cron-job output per e-mail (which can be a nuisance, but
>> is still functionality a lot of code depends upon).
>
>Presumably you got distracted by the parenthesized clauses and lost the
>end of this sentence, which was meant to end with "functionality that
>cron delivers ... is lost"?

Presumably, yes. Happens to me all the time.

>> in-sequence execution of the cron.{daily|weekly|monthly} jobs
>
>As noted in another thread, this isn't actually missing from systemd-cron,
>which still uses run-parts for these (although
>https://github.com/systemd-cron/systemd-cron/issues/47 requests the
>behaviour that it seems we both assumed it already had).

I am not sure which way is the better one. I can think of both methods
having advantages and disadvantages and would probably try the other
one if it was implemented or just available by throwing one switch.

>> ability to send cron-job output per e-mail
>
>I think sending cron job output by email can be either a positive or a
>negative, depending on the system it's happening on.

Sending cron output by e-mail has the advantage of getting the admin's
attention right away in a place where people usually look a anyway. It
has the disadvantage of not scaling at all, so the journal is the
better place for a site running more than, say, a hundred systems. But
those places tend to have monitoring mechanisms in place that can be
used to lead the administrator's attention to those systems with cron
output present.

Having cron output going to a journal at a place that doesn't have
sophisticated monitoring is hiding information and hiding problems,
which is bad. If sending cron output per mail is the default, the pain
is likely to increase with growing number of systems, motivating those
places to change things. Starting with hiding information isn't a good
thing from this point of view.

> On a traditional
>Unix server with a local MTA and monitored local email accounts, it's
>certainly expected functionality, and perhaps the best way to contact a
>sysadmin - but not every Debian system falls into that category any more,
>with many desktop systems having personal email travel directly between
>the user's MUA and remote IMAP/SMTP servers like GMail, the same way it
>typicaly would on Windows or macOS. On such systems, if there is a local
>MTA at all, it will often deliver system-level email to a mbox that the
>user probably isn't aware of and certainly never reads.

Same effect as having the information in the journal, with the notable
exception that the journal is rotated.

>It has been a recurring issue that there is no good way to notify the
>user of a typical desktop/laptop system about things going wrong during
>boot, package installation or normal operation. The system log (syslog or
>systemd Journal) is certainly imperfect, but it seems closer to a solution
>than email does - it already a concept of priority, has configurable
>data retention, interleaves messages from concurrent events in multiple
>daemons, records segfaults (and other core dumps if systemd-coredump
>is used), and includes at least a subset of messages from system boot
>and daemons (admittedly rather less complete on sysvinit systems, where
>each daemon has to implement syslog support for itself rather than just
>logging to stdout/stderr).

A single, stand-alone system is the third case, yes, but I think that
have lost the majority of those users to the more "user-friendly"
derivatives already anyway.

Greetings
Marc
-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber         |   " Questions are the         | Mailadresse im Header
Mannheim, Germany  |     Beginning of Wisdom "     | 
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834


Reply to: