Martin Wilck wrote:
On Sun, 2017-02-26 at 22:16 +0300, Andrei Borzenkov wrote:
26.02.2017 22:13, Rüdiger Meier пишет:
BTW I still have not understood if user timers would run for sure if I'm not logged in.
Not by default. systemd spawns one instance per user when first user session is opened. Once all sessions are terminated, user instance is shut down (stopping all units) unless lingering is enabled for this user. Enabling lingering is privileged operation.
When lingering is enabled for a user, user instance is started when system boots and persists until system is shutdown.
That's still very different from cron. With cron, a user can have jobs running without ever having logged in, and independent of "lingering". That's very useful, I've done it on practically all systems I've been doing serious work on. It's also highly useful for non-human system accounts that need to do stuff repeatedly.
(Btw, "lingering" enables quite some additional services to run on the user's behalf except timers, doesn't it? I'm not sure if I'd want that but I have to admit I haven't looked at the details so far).
I'm certain there's some kind of systemd magic that would also make this kind of scheduling-without-login possible. But it's nowhere close to being able to replace cron. Maybe in the long run, systemd's capabilities in this area will actually surpass cron's, and maybe even usability will be a match. But that day hasn't come yet.
First of all I have to admit that my knowledge about systemd's capabilities is ... nearly not existent. Nevertheless I'm working with Linux/Unix machines since more than 30 years now. I love it because you have a high number of small fine tools doing a specific Job - and not more but this very good. Whenever I hear about systemd I get the impression that we're getting closer to windows - which is sad in my opinion. I like these small specialists - and I hate the "I do everything" tools - too complicated, too much potential problems. one of my favourite candidates here KDE - terrible:-( another one is the "new" logging mechanism - awful. The "way" of systemd (doing a lot of tasks which were assigned to several dedicated tools before) is in my opinion not the "unix way". Yes for sure you can find some arguments for doing it this way - nevertheless my system does (from my point of view) neither better nor worse since we use systemd - I (as a user here) can't see any improvements. Maybe it's "more elegant" - but I don't care. What I realize is: it's more complicated. From a maintenance point of view I personally still prefer the small simple tools - It's easier to understand and maintain. But maybe I'm slowly converting to a sort of a dinosaur - and I'm threatened with extinction. So short summary - I cannot (and do not want to) stop the development of systemd to whatever tool it gets - but please don't forget the "linux way" of having small simple specialist - like "cron". Andreas