Per Jessen wrote:
Yamaban wrote:
On Sun, 7 May 2023 11:55, Per Jessen <per@...> wrote:
I was just working on a new logrotate setup (and expecting to get some error output) when I realised systemd timers don't have any MAILTO option, like cron does.
Having googled it a bit, I see some concoctions involving OnFailure scripts, but is that currently the best/only solution?
Thorsten Kukuk initated this sub-package in Nov.2022: https://manpages.opensuse.org/systemd-status-mail
That may be an answer (haven't tested it myself)
Thanks, that looks useful. I guess I was thinking of an option for the timer unit, as a general thing, but I think this will do the job too.
Hmm, slight twist - I want the output whenever there is any, i.e. same behaviour as with cron. I guess I have to use OnSuccess= and OnFailure= both. I'll check it out. -- Per Jessen, Zürich (22.0°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes