well, that makes sense, thanks. about a timer section shortcut, could it be done in a different way? like, it is a shortcut and systemd should somehow generate the corresponding timer file automatically? although still it would need a little special logic when loading the service first.
W dniu 08.07.2016 o 18:06, Lennart Poettering pisze: > On Fri, 08.07.16 15:42, Michał Zegan (webczat_...@poczta.onet.pl) wrote: > >> One thing to say: I heard, at least once, that systemd's timer are more >> complicated because in order to make a timer you need two files instead >> of creating one, especially in comparison to cron where you need just >> one line although I always forget the order of fields. I would say a >> timer section in the service file could be a nice shortcut to create >> timers for services quickly. > > Yes, cron lines are much more condensed than .timer unit files, and > /etc/fstab lines are more condensed than .mount unit files. But I also > believe that unit files due to their relatively uniform and > self-describing format are much easier to read at least, as well as a > lot more extensible. After all, we do expose a number of options for > timer units that I wouldn't even know how one could condense into a > cron line... /etc/fstab files are a bit more extensible than cron > lines, since the options part allows adding in additional, new > settings, but it isn't really that pretty to write them all into the > fourth column of a single line, without any whitespace and so on. > > Ultimately it's really a design decision: tabular file formats have > the benefit of being a lot more dense, but are neither particularly > extensible nor self-explanatory (as you need to know what each column > means). Unit files are a bit longer to write, but more extensible and > self-explanatory. When we designed this we preferred the latter two > properties over the density property. > > I hope this makes sense, > > Lennart >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel