Well, systemd developers made one of the classic blunders a software developer can do: make a program that has to deal with time and dates. Every time I have to deal with timestamps I’m like “oh shit, here we go again”.
Anyway, as I understood it the reason this is in systemd is because they wanted to replace cron, and it’s fine by me because cron has it’s own brain-hurt. (The cron syntax is something that always makes me squint real hard for a while.)
I’m sorry but Cron is really easy, of all systems.
Try using systemd with an ssh server that you want to have running on a non standard port. On non systemd it’s a 15 second ordeal while on systemd I don’t even know where to start, I pushed it out of my memories. It’s something something create files here, restart demons there, removing other files, it is WAY WAY over complicated
What do you mean? You literally just change the
/etc/sshd
config to point at a different port do you not?Oh yeah, without systemd that’s all there is to it. With systemd, however, port management is taken out of the ssh config and is done how it was decades ago
I run systemd with a different sshd service port and that’s all I changed
Finally we can put all the controversy around systemd to rest.
Oh fuck. I’ll use this from now on. Except for if I won’t use it next week. Then I’ll forget about it because my memory is a damn sieve.
Just take the next step and make a text file you dump all these commands into and then forget about in a week. When you randomly stumble across it years from now you’ll be able to say “wow, I could have used this 10 months ago if I remembered it existed!”
I make a separate text file per command so I can search them!
Which I dont.
God, I only have one question…
Why?
I bet it’s for timers
Did you know the next Friday the 13th is in December? ChatGPT didn’t know it. (I had to give it an extra date.now for it to figure it out)
me: systemd is not that bloated
systemd:
You need a calendar and time handling anyways for logging purposes and to set timers correctly. It’s likely not that much extra work exposing that functionality.
No, UNIX philosophy demands that every single one of those things is one or more separate things and that half of them are poorly or not at all maintained. Just like God intended.
systemd is a great operating system, it just lacks a decent text editor.
Good thing it’s editor agnostic so everybody can do the right thing in the end and choose nano
Funny way to misspell vim
Micro anyone? :D
Usually such things have a simple explanation. systemd does a lot with time and date, for example scheduling tasks. It’s quite obvious that it has this capabilities, when you think about it.
In the UK, if Christmas or New Year falls on a weekend, a seperate equivalent holiday is made during the week to compensate.
Awesome!
This is true for all public holidays in the UK, there’s a (usually) fixed number of public holidays but the dates are flexible.
They’re also included in the minimum 28 days paid time off too, meaning if you’re a full time worker and have to work on a bank holiday your employer is legally required to offer an extra day off somewhere else instead, either a fixed date or added to your holiday allowance. Conversely, the “extra” day off you get when a monarch keels over may be subtracted from your holiday allowance for the year. This is also why my employer is allowed to follow English bank holidays despite having next to no presence in England; the number is fixed but the dates are not.
Wait, do other countries not do this? So if a public holiday falls on a Saturday it doesn’t get pushed to Monday?
Germany doesn’t do this, but the minimum, when all holidays fall on the worst possible days, is more than the number of holidays in the UK.
Netherlands doesn’t do this, and we have less holidays then UK haha
It is literally happening this year.
24th is Tuesday. 1st of January is Wednesday and as a bonus Jan 6 is also a holiday in my country and that’s Monday.
So from dec 22 to jan 6 i can be home by using just 6 days off
Okay this is cool and all, but why would systemd have a calendar?
(also how do i do this)
As others have said on this thread, it’s because systemd has fairly advanced timer system that basically requires implementing a calendar.
To do it, the command is in the screenshot
systemd-analyze calendar "Tue *-12-25"
.