Live data from Hacker News

Love systemd timers

blog.tjll.net

201–210 of 309 posts

Re: Love systemd timers

#201

Earlier quoted context omitted.

> that doesn't mean that cron is the solution that needs to accompany us until the heat Yeah I agree. > systemd folks haven't exactly been the best when it comes to PR It's deeper than that. Systemd folks are enemies of Linux. First, it's "fuck your opinion, do as we say" attitude which makes me want to throw away everything that comes from that poisonous well. Second, it's the embrace and extinguish strategy employe…

> First, it's "fuck your opinion, do as we say" attitude which makes me want to throw away everything that comes from that poisonous well. On the other hand, it is a consistently heard argument when debating why the year of the Linux adoption on desktop hasn't happened yet is that there are too many standards, too many cooks. And I kinda agree with that, packaging software for multiple distributions is a hot mess, es…

systemd-as-pid1 is good. I have to admit that. I will not go back to syvinit unless a good reason comes up.

However absolutely fuck all the metastasis surrounding systemd and the shit inside, timers included.

> we need strong and good

Yeah this is true.

Problem is, this technology will absolutely be used for limiting your access to the internet from a distribution that was modified. Thus leading to locked down personal computers.

Re: Love systemd timers

#202
post #69

Earlier quoted context omitted.

XML - I see you’ve used macOS’ LaunchD, the system that inspired Systemd

Yeah, I'm a man of culture like this. However, systemd with its service dependencies runs circles around launchd in pretty much every aspect.

Service dependency resolution and parallel startup is super in systemd. Big fan of what I can do with it.

Re: Love systemd timers

#203
post #29

Timers can work with arbitrary units (not just a similarly-named service unit) so they can be surprisingly flexible. I have a timer on my servers that starts a backup.target that fires off a full "restic backup","restic prune", "restic forget" backup cycle each morning with randomized start times and notifications. The actual restic-* units are Podman Quadlets so the whole setup runs agnosticaly of what's on the serv…

I do similar stuff for backups. What's bitten me sometimes was that I disabled the timers in order to do other stuff on the restic repo (e.g. cleaning locks) but didn't see that the triggered units were still running.

Re: Love systemd timers

#204

systemd is complex on first view, but after using it you didn't want to use anything else. It's handy to manage everything using systemctl

There are still some weird things/choices in its design I don't fully understand.

For example, why do unit definitions have to be actual files on disk? Then, all of these files are reloaded when the daemon reloads, not just changed ones. But, why couldn't there be an API letting me add units programmatically? (There kind of is but it's constrained/inflexible)

Or, why can't I declare multiple units in the same file? It's really designed around the filesystem instead of abstracting at a different level, which is a choice I don't think is smart. It's not like it follows the unix philosophy though.

As for the format used for unit definitions, I wish TOML had been around so they could have had something sensible...

Re: Love systemd timers

#205

I am not the greatest fan of most of systemd's features. I will always prefer it tho since I just view it as a "packaging format". The same way I view docker. It is just that it happens to be the format that a lot of software is using and I have almost no headache integrating services, timers, logging and such of software I install. Without systemd its a mighty pain. Everyone uses the same one thing and that makes me…

Yeah nspawn has to be one the most underrated (and 100% optional ofc) components.

Re: Love systemd timers

#206
post #2

I've been almost convinced by systemd (and have switched to using it), but God the syntax of those service files is so ugly ...

Relevant, a golfed systemd polyglot file that is simultaneously an executable script: https://domi.work/blog/posts/compose_polyglot/

Yes, I have too much time sometimes... and I agree, I don't like the syntax.

Re: Love systemd timers

#207
post #116

Earlier quoted context omitted.

$ systemctl cat public-inbox-watch@.timer # /etc/systemd/system/public-inbox-watch@.timer [Unit] Description=Periodic fetch of public mailing list [Timer] # twice a day OnCalendar=*-*-* 5,17:35 RandomizedDelaySec=1h Persistent=true [Install] WantedBy=multi-user.target

So the `OnCalendar` stanza is the same as a Cron job; without the helpful comments of the ordering? And that is considered _easier_?? Just use Cron. It does one thing and does it well.

The systemd one supports timezones. You can say America/Denver and the like, or Etc/UTC

Re: Love systemd timers

#208

Earlier quoted context omitted.

> First, it's "fuck your opinion, do as we say" attitude which makes me want to throw away everything that comes from that poisonous well. On the other hand, it is a consistently heard argument when debating why the year of the Linux adoption on desktop hasn't happened yet is that there are too many standards, too many cooks. And I kinda agree with that, packaging software for multiple distributions is a hot mess, es…

systemd-as-pid1 is good. I have to admit that. I will not go back to syvinit unless a good reason comes up. However absolutely fuck all the metastasis surrounding systemd and the shit inside, timers included. > we need strong and good Yeah this is true. Problem is, this technology will absolutely be used for limiting your access to the internet from a distribution that was modified. Thus leading to locked down person…

> However absolutely fuck all the metastasis surrounding systemd and the shit inside, timers included.

Meh. systemctl list-timers is orders of magnitude better than trying to wade through /etc/crontab, /etc/cron.{hourly,daily,monthly,weekly,yearly} and whatever else non-Debian distributions come up with, and cron's arcane syntax is a mess on its own on top of that. Especially if you try to run a cronjob as not-root.

> Problem is, this technology will absolutely be used for limiting your access to the internet from a distribution that was modified. Thus leading to locked down personal computers.

That's a hypothetical threat IMHO. DRM and Cloudflare Turnstile [1] are actual threats that are far bigger in practical usage.

[1] https://news.ycombinator.com/item?id=48345840

Re: Love systemd timers

#209

I haven't used systemd timers enough to disagree, but > Ambiguous $PATH settings make cron script execution difficult to predict. What makes you say that? You can set the PATH right in the crontab. Is that harder to "predict" than it being set in /etc/bashrc, ~/.bashrc, ~/.profile, ~/.bash_profile, /etc/systemd/…, or wherever else? > You might feel cool knowing the scheduling grammar by heart I've used Linux since 19…

> I've used Linux since 1994 Same here. We are now considered old and therefore irrelevant. The new generation uses timers and couldn't care less about cron that has served us just fine for decades. I use cron and my general attitude towards LP and systemd is very similar to the attitude of LP and systemd to us.

Total n00b here. My first linux install was pretty recently, in late 1996 or early 1997 (sometime that winter).

I just don't get it. Like is the core sentiment "How dare they address obvious system shortcomings"? Is it "I learned once and how dare you think I'm capable of learning again"? Is it "I want others to suffer the way I did to learn job scheduling"?

cron did a job, but had shortcomings. Systemd addresses many of those shortcomings. One day something else will come along and address the shortcomings of systemd, and no one will care about systemd nostolgia. This is how technology is supposed to work: making progress and fixing the shortcomings of the past generation. It's not a religion, we don't have to maintain the weird old ways from the 80's, your soul won't be saved by cron or corrupted by systemd.

Re: Love systemd timers

#210
post #187
post #133

> Prime Time for a Timer Primer It's pronounced, "primmer."

TIL that's the standard US pronunciation. I thought you must be joking, referencing something else: OP's title works with BrE pronunciation at least. https://en.wiktionary.org/wiki/primer#Pronunciation

Wait, really? I'm a native Midwestern/Great Plains American English speaker (I remember reading the Harry Potter books as a kid and wondering why all the -er words were spelled wrong) and I say "PRY-mer." I have never heard anyone say "PRIM-mer" in my life.

Am...am I being punk'd...?

Post reply on HN