4 ms·
>OpenBSD with the simple, obvious solution, that everyone else kinda overlooked Systemd Timers have had this for a while.
by dralley 4y ago
>OpenBSD with the simple, obvious solution, that everyone else kinda overlooked
Systemd Timers have had this for a while.
- usr1106 4y agoRandomizedDelaySec=
- _2z1p 4y agoThey said simple and obvious, which much of systemd is not. Personally I find the OpenBSD solution far more elegant and UNIXy than the systemd one, but to each their own.
- ijustlovemath 4y agoWhat's more simple than an ini file?
- rodgerd 4y agoReinventing the same features many times over in many different places, of course.
- ratorx 4y agoWhy does the complexity of the rest of systemd matter when comparing the implementation of this feature? What would you say is wrong with RandomizedDelaySec?
- mekster 4y agoUI is too complicated to type some word concatenated keyword than being visually intuitive.
- vbezhenar 4y agoOn the other hand I wouldn't be able to understand what the hell is this cron string. I actually have no idea about cron format despite the fact that I used it multiple times. I have to read man every time I use it. Also different software implements it differently. [Timer] OnCalendar=daily RandomizedDelaySec=12h might take few more seconds to type, but it's definitely readable without any additional documentation.
- panzi 4y agoThe option says Sec but the value says h? What does that mean?
- rjh29 4y agoSec is a standard suffix for time values, anything ending with Sec accepts a value in seconds. 12h is shorthand for 'the number of seconds in 12 hours'
- Gud 4y agoStandard where? I have never seen this before and I’ve been reading *nix configuration files for 20+ years
- rjh29 4y agoStandard within systemd (i.e. consistent).
- gkbrk 4y agoIt's standard to say 12h and expect this to read as 43200? Sounds like a lousy standard if the correct way to use it is to say "I want to delay by 12 hour seconds". What is even "12 hour seconds"?
- rjh29 4y agoIn our code at work we have constants like HOUR=3600 and RESTART_TIME_SECS = 6 * HOUR. It makes sense to me. If it doesn't for you, feel free to use something else I guess.
- trasz4 4y agoYeah, but with systemd timers it's just another ad hoc hack.
- djbusby 4y agoI'm not hot for systemd but this https://www.freedesktop.org/software/systemd/man/systemd.timer.html https://www.freedesktop.org/software/systemd/man/systemd.tim... looks robust, far from ad-hoc hack.
- trasz4 4y agoHow does it look robust? Because someone wrote a man page and there's lots of boilerplate in it? Proper design reduces complexity. The above adds a lot of complexity, and thus it's a hack. Not the appearance.
- 0dayz 4y agoThat's not a hack though, a hack is gluing things together to fix a certain specific bug that is not easily solved because the bug is related to the design instead of a mere mistake. Otherwise with your standard of hack anything beyond hello world and baby's first input are hacks because everything else requires boilerplate.
- trasz4 4y agoIt's not a hack because of the boilerplate - it's a hack because it's functionality implemented in a wrong place. I think the boilerplate made you believe it's not a hack by making it look professional(ish), ie someone spend time putting a lot of lipstick on that pig, man page and all.
- dralley 3y agoHow is it functionality implemented in the wrong place?
- msla 4y agoBut, see, a number of people hate systemd, so that Doesn't Count. Even if their cron does...
- nazgulsenpai 4y agoEven when discussing OpenBSD somehow we end up debating systemd...