Re: [systemd-devel] Adding a Timer section to .service files

2016-07-09 Thread Kai Krakow
Am Fri, 8 Jul 2016 19:34:48 +0300 schrieb One Infinite Loop <6po...@gmail.com>: > As I said before, I don't want to replace .service+.timer > combination. I just think there are cases when .service file > (containing, for example, ExecStart followed by many ExecStartPost) > can have a [Crontab]

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-09 Thread Michael Biebl
2016-07-08 18:11 GMT+02:00 Lennart Poettering : > On Fri, 08.07.16 19:00, One Infinite Loop (6po...@gmail.com) wrote: > >> No, I understand perfectly why 2 files are needed. All I am saying is that, >> in some cases, a section like [Crontab] in a .service file (where you

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread David Timothy Strauss
On Fri, Jul 8, 2016 at 9:07 AM Lennart Poettering wrote: > 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 >

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Michał Zegan
the only reason to add such a thing at all is that making one file is easier/faster. There is no other reason beside this one, so if it is not considered a good one, then this feature is othervise useless. Also, some time after proposing this I realized that it would be very easy to implement what

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Andrei Borzenkov
08.07.2016 21:40, Michał Zegan пишет: > Well, I also came with another idea. of course if you do not want to > have two different ways to do one thing it is a stopper, but I will tell > about it for completeness as it may or may not be easier to implement. > Instead of creating a timer unit on

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Michał Zegan
Well, I also came with another idea. of course if you do not want to have two different ways to do one thing it is a stopper, but I will tell about it for completeness as it may or may not be easier to implement. Instead of creating a timer unit on service file installation or something, you could

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
As I said before, I don't want to replace .service+.timer combination. I just think there are cases when .service file (containing, for example, ExecStart followed by many ExecStartPost) can have a [Crontab] section with .timer syntax. The two formats (service+timer and [Crontab] inside a service

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Michał Zegan
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

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Lennart Poettering
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 >

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Lennart Poettering
On Fri, 08.07.16 19:00, One Infinite Loop (6po...@gmail.com) wrote: > No, I understand perfectly why 2 files are needed. All I am saying is that, > in some cases, a section like [Crontab] in a .service file (where you set a > few commands to run every 15 seconds) would be very useful. Well, but

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
No, I understand perfectly why 2 files are needed. All I am saying is that, in some cases, a section like [Crontab] in a .service file (where you set a few commands to run every 15 seconds) would be very useful. On Fri, Jul 8, 2016 at 6:54 PM, Lennart Poettering wrote: >

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Lennart Poettering
On Fri, 08.07.16 16:03, One Infinite Loop (6po...@gmail.com) wrote: > If you want to disable timer alone or do something else, then you could use > .timer file. If not, instead of [Install] section in .service file, you​ > could have a [Timer] section. The reason timer definitions and service

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Reindl Harald
Am 08.07.2016 um 16:21 schrieb One Infinite Loop: I want like my browser processes, for example, to run at a nice value of -15. That's why I want to run '/usr/bin/zsh -c '/usr/bin/renice -15 -p $(/usr/bin/pgrep -f /opt/google/chrome/chrome)'` every 15 seconds, for example well, nice -15 means

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
I want crontab gone and I want to delete specific files once a day and 6 minutes after I opened my computer. My Ubuntu 16.04 runs just fine, thanks for your concern. I want like my browser processes, for example, to run at a nice value of -15. That's why I want to run '/usr/bin/zsh -c

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Tomasz Torcz
Could you please stop breaking threads? Every reply you send starts a new thread, while they all belong to one mail thread. -- Tomasz Torcz"Funeral in the morning, IDE hacking xmpp: zdzich...@chrome.plin the afternoon and evening." - Alan Cox

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Mantas Mikulėnas
On Fri, Jul 8, 2016 at 4:35 PM, One Infinite Loop <6po...@gmail.com> wrote: > A few usecases: > 1) I want to delete specific files once a day > The existing cronjobs and .timer units work well enough for that. Also, systemd even ships with a predefined daily systemd-tmpfiles-clean.timer, see the

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Michał Zegan
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

[systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
OK, I have a new idea: let's not call the section [Timer] but [Crontab]. Of course, the manual page will explain what is its purpose. I expect feedback. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Reindl Harald
Am 08.07.2016 um 15:35 schrieb One Infinite Loop: A few usecases: 1) I want to delete specific files once a day what is the problem? 2)I want to free RAM using sync command and `echo 3 > /proc/sys/vm/drop_caches` every 15 seconds besides it's stupid - what is the problem? 3)I want to

[systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
A few usecases: 1) I want to delete specific files once a day 2)I want to free RAM using sync command and `echo 3 > /proc/sys/vm/drop_caches` every 15 seconds 3)I want to make sure certain processes always run using a specific nice value like -15. I know control groups are invented but it's not

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Reindl Harald
AGAIN: learn to write readable communication * quote waht you refer to * get rid of html Am 08.07.2016 um 15:21 schrieb One Infinite Loop: Why would you create another one? Why are there always people who try to complicate things? you try to complicate things since you bring a *third* place

[systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
Why would you create another one? Why are there always people who try to complicate things? The same way you read and edit your sudoers files, your fstab file, you will read & edit the .service file that your distro is shipping to you. Let's not forget about the manual page that will document the

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Reindl Harald
Am 08.07.2016 um 15:11 schrieb One Infinite Loop: There are cases when you don't need .timer files but only a [Timer] section. With a well written manual page, systemd users will understand why is useful to have a [Timer] section inside a .service file FIRST: learn to quote in email second:

[systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread One Infinite Loop
There are cases when you don't need .timer files but only a [Timer] section. With a well written manual page, systemd users will understand why is useful to have a [Timer] section inside a .service file. ___ systemd-devel mailing list

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Reindl Harald
Am 08.07.2016 um 15:03 schrieb One Infinite Loop: If you want to disable timer alone or do something else, then you could use .timer file. If not, instead of [Install] section in .service file, you​ could have a [Timer] section so and when the distribution package ships one of them and you

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-08 Thread Reindl Harald
Am 08.07.2016 um 07:35 schrieb One Infinite Loop: systemctl start foo.service systemctl enable foo.service would enabled timer *and* service how would you disable the timer alone? how do you imagine that to work with Type=forking or Type=simple sorry that is a sonsense idea because it

Re: [systemd-devel] Adding a Timer section to .service files

2016-07-07 Thread One Infinite Loop
systemctl start foo.service systemctl enable foo.service systemd tools must be modified/adjusted​ too On Fri, Jul 8, 2016 at 8:08 AM, Mantas Mikulėnas wrote: > On Fri, Jul 8, 2016 at 7:52 AM, One Infinite Loop <6po...@gmail.com> > wrote: > >> Instead of having a .service

[systemd-devel] Adding a Timer section to .service files

2016-07-07 Thread One Infinite Loop
Instead of having a .service file and a .timer file why not having a [Timer] section inside a .service file? It would be much more manageable as one file. Of course, if there are users who prefer having .timer files, .timer files will continue to exist. I use systemd 229.