Re: migration from cron.daily to systemd timers
Michael Stone <mstone@debian.org> writes:
> On Thu, Jan 09, 2020 at 02:09:12AM +0000, Paul Wise wrote:
>> This is the main reason I haven't switched to systemd timers for my
>> personal crontab, I have some jobs that generate output (diffs of
>> various things mostly) but don't fail. There doesn't appear to be any
>> tool to monitor a tool and send a mail if it generates output or fails,
>> in the way that cron does.
> mail -E ?
Specifically:
ExecStart=/bin/sh -c '/path/to/job | /usr/bin/mail -E'
in the service unit triggered by the timer unit should work, I think.
(I've not tested it.)
--
Russ Allbery (rra@debian.org) <https://www.eyrie.org/~eagle/>
Reply to: