On Montag, 26. August 2019 21:42:24 CEST Christian Boltz wrote:
Hello,
Am Montag, 26. August 2019, 09:50:25 CEST schrieb Thorsten Kukuk:
On Sun, Aug 25, Eric Schirra wrote:
Why should i do this, when i want cron? I don't like system-timer. I use always cron. Or do i not understand something?
If you need to start to debug performance issues, you will start liking systemd-timer and hate cron. You can personally use whatever you want, nobody plans to drop cron. But openSUSE is a systemd based distribution, and systemd-timer has many advantages over cron, that's why we use it as default. And if it would be a really bad decission, people wouldn't have had converted so many cron jobs to systemd-timers.
There are times when I want my /etc/cron.daily/ back (and want to have everything in there instead of having it converted to a systemd timer).
To give you a real-world example: In the good old times ;-) logrotate and logdigest both lived in /etc/cron.daily. Thanks to the alphabetical order, logdigest sent me a mail with the interesting log events just a few seconds before logrotate rotated the logs away. I'm not sure if this was just pure luck by those who chose the script names or planned, but it worked perfectly.
Pure luck ...
Then someone came up with the idea to convert logrotate to a systemd timer, which means it runs at a random time[1], and completely independent of logdigest. Until I found out what's going on, I only wondered why the logdigest mail didn't contain the amount of messages I expected...
You don't want multiple timers, you want one timer triggering two services: $> cat /etc/systemd/system/logdigestrotate.service [Unit] Description=LogDigest and Rotate Wants=logdigest.service logrotate.service After=logdigest.service logrotate.service [Install] Also=logdigestrotate.timer $> cat /etc/systemd/system/logdigestrotate.timer [Timer] OnCalendar=daily AccuracySec=12h $> cat /etc/systemd/system/logrotate.service.d/after_logdigest.conf [Unit] After=logdigest.service Regards, Stefan-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org