News for hackers. Stuff that matters.
Re:Systemd.timer, an Alternative to Cron by kaba0 on Thursday December 08, 2022 @04:30PM (#33913735)
Starting a service is way different than the service itself, what if I want it to be started when a request hits a given port? Also, the service files themselves are usually packaged up and are immutable, and every user will want different behavior on when it is started.

To me it sounds like proper architecture and your solution would be needless close coupling.

Re:Systemd.timer, an Alternative to Cron by traverseda on Thursday December 08, 2022 @04:59PM (#33914219)
Sure, then let me put a command in my files instead of requiring a separate service.

>what if I want it to be started when a request hits a given port?

I really don't think you should be turning your init system into a general programming environment that can do that.

Re:Systemd.timer, an Alternative to Cron by bravetraveler on Thursday December 08, 2022 @06:50PM (#33915491)
> I really don't think you should be turning your init system into a general programming environment that can do that.

We have :) https://www.freedesktop.org/software/systemd/man/systemd.soc...

No need for multiple anything, the units can be parameterized -- [email protected], for example

Re:Systemd.timer, an Alternative to Cron by traverseda on Thursday December 08, 2022 @09:03PM (#33916476)
Oh I know it's possible, I just don't think you should be doing that in an init system.
Re:Systemd.timer, an Alternative to Cron by bravetraveler on Thursday December 08, 2022 @09:39PM (#33916720)
Understood, fair enough. I'm not too bothered by it, it's been useful here and there
Re:Systemd.timer, an Alternative to Cron by kaba0 on Friday December 09, 2022 @02:53AM (#33918794)
Socket activation is declarative. My last point is the dynamic one, but that is just calling out to systemd. The point is, all three can share the same service description.