[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
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

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 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 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

[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

[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

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

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 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 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 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 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 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 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] *argh* Re: systemd-devel Digest, Vol 75, Issue 19

2016-07-08 Thread Mantas Mikulėnas
On Fri, Jul 8, 2016 at 6:23 PM, Reindl Harald wrote: > > There can be many instances of a application without being related in > > any way (parent and children) so niceness won't be inherited > > that is nonsense - niceness *is* inherited > > BTW: > wow - and after you

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] *argh* Re: systemd-devel Digest, Vol 75, Issue 19

2016-07-08 Thread Reindl Harald
Am 08.07.2016 um 17:51 schrieb Mantas Mikulėnas: On Fri, Jul 8, 2016 at 6:23 PM, Reindl Harald > wrote: > There can be many instances of a application without being related in > any way (parent and children) so niceness won't be

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] *argh* Re: systemd-devel Digest, Vol 75, Issue 19

2016-07-08 Thread Clemens Gruber
On Fri, Jul 08, 2016 at 06:51:13PM +0300, Mantas Mikulėnas wrote: > On Fri, Jul 8, 2016 at 6:23 PM, Reindl Harald > wrote: > > > > There can be many instances of a application without being related in > > > any way (parent and children) so niceness won't be inherited > >

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 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] Depending on services from a service unit template

2016-07-08 Thread Lennart Poettering
On Mon, 27.06.16 08:25, Paul Menzel (paulepan...@users.sourceforge.net) wrote: > Dear systemd folks, > > > having a template for a service unit like `example@.service`, and > starting several services from it, is there a way, to let another > service unit require all services started from that

Re: [systemd-devel] Depending on services from a service unit template

2016-07-08 Thread Andrei Borzenkov
08.07.2016 22:01, Lennart Poettering пишет: > On Fri, 01.07.16 06:37, Andrei Borzenkov (arvidj...@gmail.com) wrote: > >> In principle, I do not see why we cannot have WantedBy and RequiredBy as >> first class directives under [Unit] to spare all these hoops. > > systemd loads unit files as they

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 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] Question about OnUnitInactiveSec= directive

2016-07-08 Thread Andrei Borzenkov
09.07.2016 01:37, Mikhail Kasimov пишет: > Hello! > > Have a .timer service like: > > == > > [Unit] > Description=Runs VBA32 Update Hourly > Requires=timers.target > > [Timer] > OnBootSec=2min > OnUnitInactiveSec=1h > > [Install] > WantedBy=timers.target > > == > > to run

[systemd-devel] Question about OnUnitInactiveSec= directive

2016-07-08 Thread Mikhail Kasimov
Hello! Have a .timer service like: == [Unit] Description=Runs VBA32 Update Hourly Requires=timers.target [Timer] OnBootSec=2min OnUnitInactiveSec=1h [Install] WantedBy=timers.target == to run vba32update.service in 1 hour after previous update-session is over

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