On Mon, 08 May 2023 10:58:03 +0200 Per Jessen <per@opensuse.org> wrote:
Per Jessen wrote:
Dave Howorth wrote:
Right, that's pretty much what I am after - we use quite a few cron jobs for things like regular reports, log extracts, all kinds of stuff. Usually daily jobs, with output just sent to MAILTO.
The arch wiki page mentioned some utility that would parse a cron file and implement systemd-timers, including mail. Perhaps that's worth a look? (I haven't myself, sorry)
Dave, do you have a URL for that?
I have the arch wiki page: https://wiki.archlinux.org/title/systemd/Timers
Yes, section 6.4 of that page says "Several of the caveats can be worked around by installing a package that parses a traditional crontab to configure the timers, like systemd-cron. It can provide the missing MAILTO feature."
There is a reference to systemd-cron https://aur.archlinux.org/packages/systemd-cron (
which you already found?
and somewhere I even found this: :-) https://github.com/dtan4/ct2stimer (no mention of MAILTO though).
I have also just now seen that there is a "systemd-crontab-generator", that sounds like something to take a closer look at.
That's what systemd.cron runs apparently. However, note that https://manpages.ubuntu.com/manpages/focal/man7/systemd.cron.7.html says : "LIMITATIONS This cron replacement only send mails on failure. The log of jobs is saved in systemd journal." So perhaps it is of no use to you.