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

Re: Q: systemd-timer vs cron



Michael Biebl <biebl@debian.org> writes:

> Am 15.03.22 um 03:31 schrieb Paul Wise:
>> On Mon, 2022-03-14 at 11:47 +0100, Marco d'Itri wrote:
>> 
>>> Yes, this is true. These are the unit and script that I use, and I think
>>> that Debian would benefit from having something like this available in
>>> some common package.
>> ...
>>> $(systemctl status "$FAILED_UNIT" --full --lines=100)
>> 
>> Unfortunately for my cron jobs I need the entire output of the command
>> invocation, don't want any output from prior runs of the command and
>> don't want any of the output to end up in the systemd journal.
>> 
>> So I need something like StandardOutput=mail or to add some sort of
>> wrapper script to each of the relevant systemd timers.
>
> I might be mistaken here, but Luca hinted at
> $MONITOR_INVOCATION_ID in his email which means one could easily filter 
> journal output for the last failed invocation using this 
> $MONITOR_INVOCATION_ID.
> Luca, is this understanding correct?
> Afaics this would cover Paul's use case

Except for the "don't want any of the output to end up in the systemd
journal" bit.

Cheers, Phil.
-- 
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/    http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,    GERMANY

Attachment: signature.asc
Description: PGP signature


Reply to: