12 ms·
The one reason I don't use systemd timers is that they don't have an automatic, reliable way to send me an email with their output.
by rhn_mk1 5y ago
The one reason I don't use systemd timers is that they don't have an automatic, reliable way to send me an email with their output.
- funcDropShadow 5y agoIf you happen to be on a Linux system with a properly configured mta (mail daemon), which you are if cron is able to send emails, you can just pipe the output of your command to sendmail
- rhn_mk1 5y agoIt would have been nice until extra logic comes in: cron doesn't send an email when there is no output. Which is exactly what I want! Error? I must know. Output? If I left any, then it's a notification, and I must know. No output? A maintenance task succeeded, nothing to report.
- pabs3 5y agoThere is a systemd-cron package in Debian that does that, except it only sends email on success.
- traceroute66 5y ago> The one reason I don't use systemd timers is that they don't have an automatic, reliable way to send me an email with their output. I can't remember the exact unit file syntax but you can define Before/After hooks, so you can point that to a script that emails people (or in my case pushes to a notification queue).