Email or username:

Password:

Forgot your password?
rixx

Imagine wondering “When’s the next time that Christmas will be a Tuesday/Wednesday, for those sweet optimal public holidays (Jan 1st being exactly a week later)?”

Now imagine asking, idk, google or Siri or god forbid an actual calendar, instead of turning to the best tool for the job: systemd.

#systemd #linuxadmin #linux #systemd

82 comments
rixx

@dequbed Right?! It feels so wrong, and yet, systemd-timers are so *nice*. They have a status and know when they will run and when they have run, and you do need to know how to deal with calendars for this.

nadja

@rixx yeah it totally makes *sense*, but it feels wrong. I still love systemd for trying to solve the messy real world we live in, but it sure gives rise to a whole lot of unexpected features ^^

Cysio :verified_gay:​

@rixx @dequbed this is why I completely ditched cron in favor of systemd timers

rixx

“Harry, did you put the Olson database into your init system?”, Dumbledore asked calmly.

rixx

(that’s two “Dumbledore asked calmly” posts today, which led to me getting informed that the movie that gave rise to this meme came out 19 years ago, which is WRONG wrong wrong)

Dragon-sided D

@rixx I dunno... seems more like something Tom Riddle would do

don

@rixx I'm definitely feeling conflicted by this knowledge.

lambisio

@rixx Oh no, now systemd is taking over the calendar. Is there nothing sacred anymore?

Christian Vogel

@rixx I’m reading your toot while sitting in the aptly named lounge in the hotel I’m staying tonight…

Fritz Adalis

@rixx @kevin
What font is this? It looks unnaturally clear.

scy

@rixx I love it.

But it's not feature complete until it supports all of remind(1) script.

cerement

@rixx

or convince everyone to switch to a 13-month perennial calendar where 25 Dec is always Thursday AND 01 Jan is always Monday

Daniel Ligon

@cerement @rixx

13 months of 28 days is 364 days

The extra day is a Holiday and is not a day of the week?

Call it Earth Orbit Day, or something.

MegatronicThronBanks

@rixx Wow that's the first useful thing I've ever seen it do!

rixx

@megatronicthronbanks gotta try harder with the trolling, among init system wars, this doesn't even register

CatSalad🐈🥗 (D.Burch) :blobcatrainbow:

@rixx This is systemd propaganda! /jk

This feel so wrong, like emojis source code (I love it!)

rixx

@metaphil systemd-because-timers-and-scheduling-require-calendars klang nicht so gut?

schrotthaufen

@rixx @catsalad In the name of all that is sacred, why is that real?!?

rixx

@schrotthaufen @catsalad Because systemd-timers are an actually really cool thing, but if you implement a scheduling system, you need to understand calendars, to allow people to say "do this every Monday".

(sorry, this is assuming you wanted an answer)

Jann Horn

@rixx this doesn't work properly though:

jann@tigerlap:~/linux$ systemd-analyze calendar --base-time='2010-01-01' "*-*-* 23:59:60"
Failed to parse calendar specification '*-*-* 23:59:60': Invalid argument
Daniel

@rixx
People with strong opinions about systemd right now:

Gilgwath

@rixx At least it will get you the correct answer. Try asking chatGPT stuff like that 😂🫣

Patrick Morris Miller

@rixx Want to know why only Apple products are allowed in my house? This. This is why.

(Dear penguinheads, my killfile thirsts for your souls. If you reply I shall feed you to it.)

ordinary space cat

@rixx systemd-analyze calendar is such a great tool :blobcatsurprised:

ttamttam

@rixx it is funny. But honestly I'm not even conflicted about this. If you want to run timers, which is very reasonable for an init system; you need to handle real, human, times and all their messiness. Say you want to automate a holiday email, or manage processing of documents at certain business defined times.

wink

@ttamttam I love your optimism if you actually trust a random linux box (with systemd or without) to run this timer in 5 years, through (supposedly) 1-2 OS upgrades. @rixx

ttamttam

@wink @rixx
Honestly since I switched to NixOS (btw)... Yeah.
But same could be said for Ansible or Chef or any kind of declarative infrastructure as code setup. Systemd timers have been rock solid for me. So, like you implied, the issue is not the timer but making sure the config survives. Good configuration hygiene goes a long way in mitigating this.

rixx

@ttamttam @wink likewise, most of my servers have been around for easily five years or more, and while I am far from a professional sysadmin, and I have broken many things, misplacing my systemd files has never been one of them.

sabik

@wink @ttamttam @rixx
Realistically, you'd be scheduling things like "1st and 15th of each month" or "first Saturday of each month", maybe annually at most; it just winds up that by the time you implement the useful patterns, you also get impractical ones, like "each time Christmas falls on Tuesday"

rixx

@ttamttam I did say that in my other replies! I was just going for funny - but then, I am German, so I probably should just... Not do that

loop0

@rixx soon we are going to be naming SystemD/Linux instead of GNU/Linux

John Timaeus

@rixx

I actually demonstrated this a few classes ago. As a way to figure out the furthest out you can set a cron job. I think it was on a Wed 29 Feb.

All the LLMs gave a wrong answer.

zetaReserve

@rixx the real question for me is ... how are you able to post this information almost one month in advance?

Cy
W-why would systemd even have that
Anatol

@rixx delightfully cursed (but yeah, it does make a lot of sense!)

Now - can it do Easter?

Taneb
@dngrs @rixx I think you'll have to wait a very long time before you find a year when Easter falls on a Tuesday....

Serious answer: I don't think so
UpLateGeek

@rixx perfect, don’t forget to let John Connor know so he can take a well-deserved break. After all, that’s the same year he sent Kyle Reese back to 1984, on a mission to save Sarah Connor’s life (and, indeed, impregnate her to create John Connor in the first place).

Cryptomon

@rixx meine Tochter fragt ständig, wann ihr nächster Geburtstag am Geburtsgeburtstagtag (Neologismus von ihr) sein wird und ich rechne jedesmal rum. Danke!
(Sie ist am Sonntag den 19.10.2014 geboren, dieses Jahr war es ein Samstag, da nächstes Jahr kein Schaltjahr ist, wird es nächstes Jahr so weit sein. Prüf ich gleich am Rechner 🤪)

proedie

@rixx Yeah, but does it do moon phases?

Bruce Heerssen

@rixx
Oh, this is brilliant. I will never need this, but it's absolutely brilliant. Thanks.

Em :anarchistflagblack:

@rixx and then imagine for most of the world christmas applies too, the main holiday is on the 24th 😎

rixx

@Em is it really? The countries I have lived in are evenly split on the issue, and eg here in Germany, the 24th isn't even a full public holiday, because it is, after all, only Christmas Eve.

Em :anarchistflagblack:

@rixx traditionally, Christmas Eve is the main holiday (where presents are given and the churches are visited) and afaik in Germany, 24th is a full holiday but that might have changed in the last years tbh since I burned out and left the world of labor lol.

rixx

@Em The 24th has ~never been a full holiday. The 25th and 26th are full holidays, the 24th and 31st are half holidays.

It’s true that the gift-giving in Germany is traditionally on the 24th, though the church visits are ~late at night or on the 25th in the morning for those who can’t do late nights.

Idk how you’re counting “most of the world” part, even ignoring countries that celebrate January 6th – I know several countries where the 25th is proper Christmas, and 24th "just" the eve.

Em :anarchistflagblack:

@rixx a fair objection and I think I might have been a bit biased here😞

David JONES

@rixx I wonder if Python packaging can do this too...

Zach (Ela) - TechnicalOtter

@rixx every time I learn about something new systemd can do, the more I wonder "is systemd an operating system of it's own?"

dram🎀

@rixx ooh i like doing this party trick with friday the 13th dates. far more useful (?)

MarjorieR

@rixx total overkill for something you can bracket in you head (7 years - 1 or 2 for leap years) and then just look it up in your evolution calendar.
(Don't have the systemd cancer anyway).

rixx

@marjolica aww, I knew it would bring out the trolls eventually! It’s so heart-warming to see the old Linux traditions alive and well.

MarjorieR

@rixx strikes me that you're the one trolling.
No doubt I wont be around to react when you get to enjoy your next but one public holiday.

rixx

@marjolica hmmmmm yes, I’m sure “systemd cancer” was not trolling at all, just a calm reasoned response. byeee 😘

MarjorieR

@rixx "Cancer is a group of diseases involving abnormal cell growth with the potential to invade or spread to other parts of the body."
Systemd is a cancer on the body of Gnu/Linux. As originally sold, as a simple init system, it would have been fine. That there's a systemd.calendar is simply evidence of the spread.

thbe

@marjolica @rixx Good thing is that you can freely pick the Init system of your choice and do not need to resort to poor comparisons and insensitive language out of nowhere. Oh wait...

Mindiell

@rixx shouldn't next elapse be in one month ?

rixx

@Mindiell rounding is hard, let’s go shopping

climbertobby

@rixx can SysV-init do that? No? thought so!

🤣

rixx

@climbertobby You would not believe how tempted I was to end my post like that – took all my willpower to walk past …

Ludovic Poujol

@rixx

Oh nice!
I guess you can even use it to know when would be the next "Firday 13th" :D

Ben Hearsum

@rixx thanks i hate it. but i also applaud you

saiarcot895

@rixx this probably uses fewer resources (taking everything into account) than any of the other approaches you mentioned.

Go Up