News for hackers. Stuff that matters.
Re:GNU Mcron by otterley on Saturday May 05, 2018 @12:32PM (#17002504)
Now that timers are baked into systemd[1], the days of cron and its cousins seem to be numbered. The systemd timer specification is pretty rich, and since it can control any arbitrary systemd unit, I can't imagine using a legacy solution anymore.

[1] https://www.freedesktop.org/software/systemd/man/systemd.tim...

Re:GNU Mcron by jimktrains2 on Saturday May 05, 2018 @12:50PM (#17002569)
Except that cron is simpler and more widely deployed (e.g. traditional unixes and *bad). I can't imagine cron ever going away.
Re:GNU Mcron by jcelerier on Saturday May 05, 2018 @01:34PM (#17002764)
> Except that cron is simpler

simpler to the point that you need whole libraries and helpers (such as https://www.freeformatter.com/cron-expression-generator-quar...) to convert from readable time to cron specifications ?

Meanwhile, sd is just

    [Timer]
    OnCalendar=weekly
Re:GNU Mcron by Karrot_Kream on Saturday May 05, 2018 @03:17PM (#17003305)
Sure but there are tons of simple cron alternatives with better syntax that don't need systemd (such as fcron). In fact, Mcron from the OP can be configured using Scheme.
Re:GNU Mcron by jcelerier on Monday May 07, 2018 @03:32PM (#17015728)
> Sure but there are tons of simple cron alternatives with better syntax

But you loose the main point, that is consistency of syntax. Nowadays thanks to systemd I can use the exact same syntax to configure my daemons, my network, my DNS resolver, my timers, my locale, etc etc. The mental burden is way lighter than with the traditional UNIX toolset.

Re:GNU Mcron by JdeBP on Monday May 07, 2018 @07:15PM (#17017277)
That does not wash.

You could have made the same consistency and mental burden argument about the crontab syntax. There are a lot of things in Unix which are table-driven and the tables take the form of one line per record with fields delimited by whitespace, blank lines ignored, and line comments introduced by hash.

Indeed these are your job scheduler (crontab), your mount points (fstab), your local host name resolution (hosts), your NS switch (nsswitch.conf), your terminal login services (ttys), your device permissions (fbtab), your automounts (auto_master), your plug-and-play device permissions (devfs.conf), your network services (inetd.conf), your MAC policy (mac.conf), your local network name resolution (networks), your call-out telephone numbers (phones), your network protocol name map (protocols), your RPC service map (rpc), and your network port name map (services).

And those are just the ones in /etc .

This set of table files with a common syntax is just as consistent and as light a burden as the set of .INI files that you are talking about. And any argument that you can make about things like having to remember what the fields mean can also be made just as much about the .INI files.

Re:GNU Mcron by syrrim on Saturday May 05, 2018 @03:21PM (#17003326)
>need

You only "need" to read the man page - the same as with systemd (asuming it still uses man, and not its own custom help viewer). If you'd read said man page, you'd know you can just type @weekly, for such a simple time period.

Re:GNU Mcron by otterley on Saturday May 05, 2018 @03:24PM (#17003338)
How about monotonic timers? cron doesn't have those.
Re:GNU Mcron by jimktrains2 on Saturday May 05, 2018 @06:52PM (#17004317)
Which cron? There isn't only a single cron.
Re:GNU Mcron by otterley on Saturday May 05, 2018 @07:24PM (#17004431)
Vixie cron, the standard one nearly everyone used to use.
Re:GNU Mcron by JdeBP on Sunday May 06, 2018 @04:12AM (#17005677)
The standard cron that nearly everyone used to use would have been Williamson cron. Paul Vixie's PD cron (which was the original name for it) was a clone from 1987, and it of course was not used where people used the standard one, so was clearly not the one "nearly everyone" used.

It never became it, either. It was fairly quickly forked. Several times. Debian cron was forked from PD cron in 1994 by Ian Jackson, for example. The "standard one that everyone used to use" but only in the limited field of Debian Linux (and no longer, nowadays with Debian Linux version 9) was that fork, which M. Jackson actually named "Debian/GNU Linux's". RedHat made a comparatively much more recent fork. OpenBSD and FreeBSD have their own (different from each other) forks of long standing, too.

Mike Meyer apparently made a GNU cron for the Free Software Foundation in 1987. If it indeed ever existed in the first place, it has since disappeared without a trace.

I provide pre-made service bundles for the nosh toolset for various crons, and I have so far had to make separate ones for Dillon crond, Debian cron, Vixie (a.k.a. ISC or PD) cron, Guenter bcron-{spool,start,update}, Godouet fcron, and OpenBSD cron; because they are significantly different from one another.

In part, this is because although the crontab utility is actually standardized, in the SUS, cron (like many such non-ordinary-user-facing internals) is not standardized. This is actually a good thing, inasmuch as the radically different multiple untrusting dæmons architecture of Guenter bcron would not have been possible if it had had to conform to a standard of one monolithic cron dæmon.

Re:GNU Mcron by otterley on Sunday May 06, 2018 @04:44PM (#17008411)
The history of cron is indeed fascinating. But I think you interpreted the word "standard" too literally. I meant "the most commonly-encountered and well-known cron implementation to date."
Re:GNU Mcron by jimktrains2 on Saturday May 05, 2018 @08:26PM (#17004650)
> OnCalendar=weekly

What's that mean though? It's entirely meaningless unless you, what's that, check the manual. Or what if you want it to run on another day? What's that? Check the manual? Sound familiar?

Re:GNU Mcron by userbinator on Saturday May 05, 2018 @10:40PM (#17005002)
What's that mean though?

In particular: which day of the week, and at what time?

cron expressions have about as much learning curve as ISO-8601, and are otherwise unambiguous once you know how to read them. systemd's time specifications look like they're full of special cases:

https://www.freedesktop.org/software/systemd/man/systemd.tim...

Re:GNU Mcron by otterley on Saturday May 05, 2018 @11:48PM (#17005138)
Monday at midnight, pretty simple. If you care what day/time the "weekly" event occurs at, the "weekly" literal is not for you.
Re:GNU Mcron by jimktrains2 on Sunday May 06, 2018 @12:40AM (#17005230)
> Monday at midnight, pretty simple

Why is that simple? Monday isn't even the first day of the week!

Re:GNU Mcron by tscs37 on Sunday May 06, 2018 @02:55AM (#17005530)
Monday is first day of the week according to ISO 8601. This is also the case in most European countries. In the middle east Saturday would be the first day and in some countries (notable North American and Islamic) it's Sunday.

But ISO 8601 is the standard so it makes sense to use that.

Re:GNU Mcron by jimktrains2 on Sunday May 06, 2018 @10:39AM (#17006564)
Sure, but there is nothing telling me it's adhearing to 8601 in that snippet. Why isn't it using the tm struct where Sunday = 0? I, what's that?, Have to check the documentation? ::gasp:: just like if you forget the order of the cron tab columns...
Re:GNU Mcron by tscs37 on Sunday May 06, 2018 @10:54AM (#17006607)
It's pretty intuitive once you've done it twice unlike cron's impenetrable syntax, tbh.

They also have other desirable behavior like being able to configure it concurrent runs are allowed or if the script should run if the initial date was missed or even restart the job if it fails up to a limit.

It's much more versatile than simply cron, due to that, it's also a lot more useful.

Re:GNU Mcron by jimktrains2 on Sunday May 06, 2018 @11:47AM (#17006811)
https://www.freedesktop.org/software/systemd/man/systemd.tim... is 1300+ words.

https://www.freebsd.org/cgi/man.cgi?crontab(5) is 1400 or so.

I'd hardly call that impenetrable. Additionally you will note that free bad has an extension to the format for shortcuts like monthly, weekly, &c.

Re:GNU Mcron by tscs37 on Sunday May 06, 2018 @11:58AM (#17006847)
I'm aware of the extension but Systemd Timers have RandomizedDelaySec which allows me to schedule nightly backups without having to coordinate about 20 different machines into timeslots.

I should note that `man crontab | wc` returns 1680 words while `man systemd.timer | wc` returns 1300 words. Take that for what you while, especially since .timer spends most words on explaining the options instead of the syntax.

Re:GNU Mcron by jimktrains2 on Sunday May 06, 2018 @02:49PM (#17007707)
There's little functional difference between syntax and options in this case, as the options in systemd serve the same purpose as the syntax iin crontab.

I just don't want cron doing randomized delay and repeats. That should functionally be determined by the application.

Re:GNU Mcron by tscs37 on Sunday May 06, 2018 @02:57PM (#17007763)
>I just don't want cron doing randomized delay and repeats. That should functionally be determined by the application.

I think it's perfectly fine that timer does this, it's useful. The applications I run don't support this behaviour out of the box, so why should I have to code up something for each app?

>There's little functional difference between syntax and options in this case,

There is an important difference. The manpage on timers spends most words explaining what exactly each option does and how it can be useful while most of the crontab manpage explains how the syntax works, the options crontab provides are minimal.

[dead]
Re:GNU Mcron by dang on Sunday May 06, 2018 @03:40PM (#17008047)
Commenting like this will get you banned here, and you've unfortunately been uncivil in the past too.

Please read https://news.ycombinator.com/newsguidelines.html and use the site as intended from now on.

Re:GNU Mcron by jimktrains2 on Sunday May 06, 2018 @05:30PM (#17008676)
I forgot that sarcasm isn't welcomed here, even when someone makes baseless and nonsensical claims.
Re:GNU Mcron by dang on Sunday May 06, 2018 @08:22PM (#17009516)
It isn't sarcasm that's unwelcome here, but snark and personal attacks.
Re:GNU Mcron by jimktrains2 on Sunday May 06, 2018 @09:07PM (#17009685)
Snark is just sarcasm you don't like.

I never attacked them. I simply found how they described cron extremely funny given that it's entirely contradictory to mine and pretty much everyone I've discussed sys admining with.

The man page, with system specific extension, is barely 1500 words long. That's neither impentrable nor complex.

I've just tired of dealing with people who have no way to describe things but with hyperbole, making an actual discussion difficult, if possible at all, because the facts of the matter can never be clearly stated. "I don't like cron because I can never keep the columns straight (and we can't keep comments in our crontab for w/e reason), the division symbol is used in a weird way, and I want _my_ services/code simple and my _system_ to handle complexity" is a much more honest way to complain about cron. Saying it's impenetrable is a load of BS and entirely unhelpful to the discussion.

So yes, I laughed at their response. No, it was not a personal attack. Finding someone's argument terrible and divorced from reality, or otherwise just hyperbole over known issues is not a personal attack. I'm making no judgement on them as a person. I'm not basing my response on anything except what they've said and constraint my response to be entirely within the scope of the argument, not extending it to them as a person.

Now, we can discuss if my response is helpful and furthers the discussion. Probably not. (Although,I did try to follow up with one that was.)

Was it uncivil or a personal attack? Absolutely not.

Re:GNU Mcron by otterley on Sunday May 06, 2018 @09:54PM (#17009857)
First, arguing with a moderator is unlikely to get you the outcome you're looking for.

Second, you're continuing even still with unwelcome, potentially hurtful, and overly-judgmental characterizations of another member's opinion and experience as a "load of BS," following your earlier characterization of someone's comment as "laughable." You may disagree with another's opinion, but there are less divisive ways to express it than how you've done it so far.

The majority of HN participants debate issues -- even ones that are contentious or may have "obvious" answers -- with an inclusive tone that conveys respect. We'd do well to look to them for inspiration.

Re:GNU Mcron by jimktrains2 on Sunday May 06, 2018 @10:38PM (#17010014)
I actually don't know who the moderators are here, nor am I looking for any specific outcome. Even if I knew all the mods, I would treat them as any other member. Not doing so would imply I treat other members poorly or that the mods have a god complex, neither of which I believe to be true. Moreover, if they deem me unfit to be a member of this community, I doubt grovelling and theatre would do any good.

> Second, you're continuing even still with unwelcome, potentially hurtful, and overly-judgmental characterizations of another member's opinion

None of which is a personal attack. It's quite literally impossible to not be hurtful to everyone all the time. It's not worth my effort to go out of my way to not be direct (which isn't rude).

It's more than possible to find an argument BS or laughable without that being a commentary on the presenter of said argument. Plenty of not-stupid people make stupid and shitty arguments -- myself included.

I expect my BS, poor arguments, and bad reasoning to be called out and corrected without needing to beat around the bush or otherwise sugar coat it. I'm an adult, I can accept when I'm wrong when presented with a convining argument. I expect others to find some of my opinions dumb, or otherwise incompatible with their world view. That isn't the other person being uncivil, disrespectful, or otherwise antagonistic or launching ad hominems. They shouldn't feel ashamed for voicing that either, many times over if I'm presenting my opinion as some universal truth.

> The majority of HN participants debate issues -- even ones that are contentious or may have "obvious" answers -- with an inclusive tone that conveys respect. We'd do well to look to them for inspiration.

What have I done that's disrespectful or otherwise not inclusive. It's very saddening that simply finding someone's opinion, especially one that's no where near deep-seated or otherwise a defining characteristic, so over the top with exaggeration that it's funny is now considered not inclusive or disrespectful.

People can be respected without needing to baby them and protect their egos.

However, arguments are not the people that make them. Arguments deserve no respect simply for existing. The fast bad, false, or ineffective ones die, the better. If we can't sit and discuss arguments and options without everyone taking it personally, we will never be able to get far as a society.

Re:GNU Mcron by dang on Sunday May 06, 2018 @10:45PM (#17010041)
You make some fine points, but the dominant consideration here is a simple practical one: we know from many years of experience what an internet forum turns into when people respond to others with "Give me a few minutes to recover from laughing, please. Impenetrable. Lololololol." and similar. It leads to flamewars, insults, and tire fires. The smart people get tired of it and leave. The rest keep flaming each other till nothing but scorched earth is left.

So, while I personally agree with some of what you said, I can't let you post like that, for the same reason that if I were a park ranger I wouldn't let you start dangerous fires. If you want to keep commenting here, please read https://news.ycombinator.com/newsguidelines.html and make a point of using the site as intended.

Re:GNU Mcron by jimktrains2 on Sunday May 06, 2018 @11:11PM (#17010152)
> we know from many years of experience what an internet forum turns into when people respond to others with "Give me a few minutes to recover from laughing, please. Impenetrable. Lololololol." and similar.

Fair point. It doesn't move the conversation forward in any useful way.

I'll keep my comments tuned to further a debate, and not just react aimlessly.

I'll also refresh on the guidelines.

Re:GNU Mcron by dang on Monday May 07, 2018 @05:16PM (#17016550)
Thanks!
Re:GNU Mcron by tscs37 on Sunday May 06, 2018 @11:54AM (#17006839)
>Give me a few minutes to recover from laughing, please. Impenetrable. Lololololol.

? It's a personal opinion, you can laugh all you want but that won't make it any more wrong than yours.

>Those just feel out of scope to me. Why would I want this tool to handle that?

I run my backups with a systemd timer. Since it's a desktop system it might not be online during a desired timeslot so the backup can be repeated once the machine becomes available after that. Additionally it prevents concurrent backup runs on my servers if a snapshot is taking longer for a reason (which does happen when too many servers get scheduled at the same time, which btw, is handled by having the timer with a random offset to the schedule which last I checked is not present in cron).

It's something I want this tool to handle, yes.

>So much laughing this morning! You should really try an open mic night!

Why? Because I find a tool that solves my problems useful? Sounds like you should reconsider your standpoint because to me it sounds like you claim that cron is the one true tool to solve timed scheduling of scripts. Which it clearly isn't since cron doesn't solve the problems I have.

Re:GNU Mcron by jimktrains2 on Sunday May 06, 2018 @02:49PM (#17007713)
No, I'm laughing at the thought of cron being impenetrable and complex.
Re:GNU Mcron by _eht on Saturday May 05, 2018 @12:58PM (#17002612)
It reminds me of ed, vi and nano. Their distributions with unix and linux can be counted on pretty safely to exist.
Re:GNU Mcron by qbrass on Saturday May 05, 2018 @04:26PM (#17003597)
I wouldn't count on nano to be there outside of Linux distros.
Re:GNU Mcron by calcifer on Saturday May 05, 2018 @03:17PM (#17003306)
> *bad

?

Re:GNU Mcron by syrrim on Saturday May 05, 2018 @03:22PM (#17003328)
Probably s/a/s/.
Re:GNU Mcron by jimktrains2 on Saturday May 05, 2018 @06:49PM (#17004306)
Yeah, as siblings said, BSD. I'm past the edit period :-/
Re:GNU Mcron by Mononokay on Saturday May 05, 2018 @03:58PM (#17003488)
My guess is that he mistyped *BSD.
Re:GNU Mcron by josteink on Saturday May 05, 2018 @01:09PM (#17002655)
On embedded you really don’t find systemd anywhere. At least not yet.

Cron, busybox and friends are still good things to master.

Re:GNU Mcron by Exorus18 on Saturday May 05, 2018 @02:30PM (#17003091)
Well, I used systemd as an init system on a device I was working on (based on imx.6) because it turned out systemd was faster than sysVinit. And from my experience it is very popular now oj embedded systems.
Re:GNU Mcron by jcelerier on Saturday May 05, 2018 @01:13PM (#17002673)
> On embedded you really don’t find systemd anywhere.

don't you ? my phone from 2013 runs systemd and wayland.

Re:GNU Mcron by jchw on Saturday May 05, 2018 @01:20PM (#17002705)
Out of curiosity, what phone/OS is that? I don't believe stock Android runs either of those, right? (iirc, they have a custom init daemon and compositor, am I wrong?)
Re:GNU Mcron by Mediterraneo10 on Saturday May 05, 2018 @01:37PM (#17002775)
The OP is probably describing the Jolla 1 phone, released in 2013, and running Sailfish OS that was based on Systemd and Wayland from launch.
Re:GNU Mcron by jcelerier on Sunday May 06, 2018 @12:07PM (#17006886)
Indeed
Re:GNU Mcron by josteink on Monday May 07, 2018 @03:44AM (#17011013)
While your phone may run systemd, modern phones are pretty powerful compared to platforms traditionally considered "embedded".

It's also an extremely niché phone... Witch I seriously wanted to try out, but couldn't because it was actually impossible for me to buy.

It's definitively not representative for phones in general, and certainly not for embedded Linux as a wider term.

Edit: Things might be changing though.

For instance my Netgear NAS used to run a custom Debian-derivative based on Debian 7 (which used sysvinit). But I discoverd today that after some recent updates it's now based on Debian 8 (which ships with systemd instead).

Based on that, I could produce the following plot[1], on a "embedded" device. Which I now know spends a tremendous 42 seconds booting the kernel. I guess it contemplates life, the universe and everything before moving along :)

[1] https://gist.github.com/josteink/3cf87479b97d8ab3eac81cba719...

Re:GNU Mcron by alxlaz on Sunday May 06, 2018 @08:13AM (#17006113)
Unfortunately, it's what Yocto uses by default nowadays, so it's actually very ubiquitous.

It has made my life miserable more than once, but looking at how many hours I've spent working around it, I can see why consulting companies love it.

Re:GNU Mcron by rvense on Saturday May 05, 2018 @03:02PM (#17003229)
I've seen it in a few places, both a buildroot system and one based on Fedora (of all things). Not "small" embedded systems, but devices meant to do one thing and not act as general purpose computers.
Re:GNU Mcron by Karrot_Kream on Saturday May 05, 2018 @03:23PM (#17003334)
This feels like unnecessary evangelism in a thread not about systemd.
Re:GNU Mcron by chriswarbo on Monday May 07, 2018 @10:29AM (#17012996)
Systemd has become quite popular among Linux distros, but it's not universal; plus Linux isn't the only Unix system around; and there's more to operating systems than just Unix.

It's also not just a matter of time before everyone switches over, since there's been backlash against systemd and competing projects have either started up, or gained more momentum (except for upstart, obviously!).

One of those alternatives is the "dmd" init system, which seems to have been around for a while but has recently been rebranded as "GNU Shepherd". Shepherd follows the "do one thing well" philosophy, so it only manages daemons. If shepherd users (e.g. GuixSD) want to run scheduled commands, they'll need another program to do that (i.e. a cron daemon), and GNU Mcron looks like a sensible choice since all of these things are configured using Guile Scheme.

As a side rant: I dislike your use of the term "legacy" for something which is actively maintained and gaining users. Usually "legacy" refers to something which is either abandoned, or where the maintainers recommend against adopting it (e.g. "that's our legacy API, use this other one instead"). I think the word "traditional" would work, when talking about cron in general; although Mcron in particular doen't look like a particularly traditional cron (since its selling point is using Scheme for config!)

Re:GNU Mcron by JdeBP on Monday May 07, 2018 @03:09PM (#17015522)
Usually "legacy" refers to something bequeathed in a will.

* http://jdebp.eu./FGA/legacy-is-not-a-pejorative.html

Re:GNU Mcron by Crontab on Saturday May 05, 2018 @02:05PM (#17002917)
I think systemd is gross and its configuration files awful. I have often wondered why the Linux community, in general, finds it acceptable and I can only conclude that it is because they are no longer attempting to create a good Unix.
Re:GNU Mcron by drb91 on Saturday May 05, 2018 @01:17PM (#17002694)
Is there any reason to switch to systemd?
Re:GNU Mcron by otterley on Saturday May 05, 2018 @01:22PM (#17002720)
The fact that the Linux distributions that practically everyone uses have adopted it is pretty compelling. :)

But seriously though, it solves a lot of problems around dependency and device management, error handling, logging, timer management, and so forth. To be sure, it has a steep learning curve, but I've found the effort invested to be well worth it.

Re:GNU Mcron by tannhaeuser on Saturday May 05, 2018 @06:38PM (#17004262)
Systemd doesn't "solve" these problems so much as it puts them into a Windows-y monolith that you then have to understand in its entirety, and have to update all the time, forcing you to startup/shutdown services managed by it. Given its accumulated complexity, systemd isn't viable for HA systems.
Re:GNU Mcron by otterley on Saturday May 05, 2018 @09:26PM (#17004820)
> systemd isn't viable for HA systems

You mean, besides all the highly-available systems on which it currently runs? Since it's already part of the two most-used distributions in the world, it's fair to say that it's gotten sufficient exercise such that all of the serious kinks have been worked out by now.

Also, I'm not sure what you mean by having to "update all the time." Sure, systemd gets occasional security/bugfix patches, but so did sysvinit. And like sysvinit, systemd is hot-reloadable, so it's never been a problem in practice.

Re:GNU Mcron by drb91 on Saturday May 05, 2018 @02:16PM (#17002992)
Right, but cron works everywhere. Also, I can’t say i’ve ever had the thought “you know what cron needs? A steep learning curve and dependency management system.” That’s nuts. Cron isn’t going anywhere anytime soon.
Re:GNU Mcron by otterley on Saturday May 05, 2018 @02:54PM (#17003196)
That wasn't the question. The question was, "why should I use systemd?" not "why shouldn't I use cron?"

As for the timer functionality in systemd, the configuration language is, IMO, far easier to understand. It doesn't get any easier than:

   [Timer]
   OnCalendar=weekly
or:

   [Timer]
   OnStartupSec=0
   OnActiveSec=1h
Re:GNU Mcron by drb91 on Saturday May 05, 2018 @04:40PM (#17003678)
Sure. But your pitch is incredibly unrealistic for actually convincing anyone systems is obsoleting cron (except for linux distro specific packages, i’m sure).
Re:GNU Mcron by wbl on Saturday May 05, 2018 @02:43PM (#17003147)
I once had to make something work with it. Couldn't do it, couldn't figure out what the heck was going wrong.
Re:GNU Mcron by userbinator on Saturday May 05, 2018 @12:37PM (#17002522)
I'm not surprised. systemd reinventing and horribly overcomplicating things is nothing new.
Re:GNU Mcron by Walkman on Saturday May 05, 2018 @02:53PM (#17003190)
systemd timers are actually simpler than cron syntax!
Re:GNU Mcron by Sir_Cmpwn on Saturday May 05, 2018 @04:26PM (#17003601)
Maybe for the person writing the timer, definitely not for the person implementing them.
Re:GNU Mcron by Walkman on Saturday May 05, 2018 @04:51PM (#17003735)
which is more?
Re:GNU Mcron by Sir_Cmpwn on Saturday May 05, 2018 @04:55PM (#17003756)
More what?
Re:GNU Mcron by Walkman on Saturday May 05, 2018 @05:30PM (#17003947)
Are there more persons implementing the timer or more sysadmins using the timers and specifying timer syntax every day?
Re:GNU Mcron by Sir_Cmpwn on Saturday May 05, 2018 @05:36PM (#17003978)
For some people, myself included, on a long enough time scale you end up working on every piece of software on their system. In this case the simplicity is valued.

Different tools suit different people. Cron isn't dying any time soon just because the casual Linux user is better served by systemd.

Re:GNU Mcron by Walkman on Saturday May 05, 2018 @06:58PM (#17004343)
Are you saying you have committs in cron, SysV init and in the Linux kernel?
Re:GNU Mcron by Sir_Cmpwn on Saturday May 05, 2018 @07:01PM (#17004353)
No. But I have commits in lots of things and I've definitely dealt with the code of several cron implementations and the Linux kernel, among other kernels.
Re:GNU Mcron by otterley on Saturday May 05, 2018 @12:39PM (#17002533)
Do you have substantive feedback about the systemd timer implementation, or are you just here to shitpost?
Re:GNU Mcron by nimbius on Saturday May 05, 2018 @12:53PM (#17002587)
no, the poster is citing well documented historical evidence that systemd reinventions of traditional posix compliant unix/BSD/Linux services arrive as a horrendously complex mess of overcomplicated code.

take oddjobd for example, which supplants pam_mkhomedir.so in creating a users home directory on first login. oddjob is its own standalone daemon running constantly, while pam_mkhomedir is invoked only as necessary. oddjob needs dbus and systemd to complete what in many systems is just a simple mkhomedir && chown user:grp $homedir. its now fully dependent on the most fundamental building blocks of your OS to do one simple thing.

this also assumes the user doesnt have a home directory...which...many do.

in most commercial infrastructure if you suggest installing oddjobd to handle the potential for a user to log in without their home youll be laughed out of the chat. oddjobd forces organizations back into the 1980s and NIS based implementations of federated authentication where you had to go to a new user machine, or an account creation machine first if you dont want to run yet another idle daemon on your machine

Re:GNU Mcron by userbinator on Saturday May 05, 2018 @01:00PM (#17002622)
Another memorable example is systemd's DNS resolver which somehow has to involve XML parsing/unparsing just for a simple hostname lookup: https://lists.dns-oarc.net/pipermail/dns-operations/2016-Jun...
Re:GNU Mcron by otterley on Saturday May 05, 2018 @01:44PM (#17002806)
What does systemd-resolved have to do with systemd's timer implementation? It's possible to agree that the resolver implementation is problematic, while other parts of the ecosystem are reasonably good.
[dead]
Re:GNU Mcron by dang on Sunday May 06, 2018 @03:04PM (#17007809)
This breaks the site guidelines badly, particularly the ones about civility and avoiding shallow dismissals. We ban accounts that post like this (regardless of how wrong someone else might be), so please read https://news.ycombinator.com/newsguidelines.html and follow the rules from now on.
Re:GNU Mcron by userbinator on Saturday May 05, 2018 @01:23PM (#17002726)
Wow. Perhaps you should read through this and then reconsider who is "technically illiterate":

https://news.ycombinator.com/item?id=14652787

Re:GNU Mcron by wereHamster on Saturday May 05, 2018 @12:58PM (#17002608)
> the poster is citing well documented historical evidence

I don't see any of that citation. Or evidence.

Re:GNU Mcron by dig1 on Saturday May 05, 2018 @01:10PM (#17002659)
For evidence, use the source Luke ;) systemd has plenty of reinvention evidences...
Re:GNU Mcron by otterley on Saturday May 05, 2018 @01:17PM (#17002691)
What does this have to do with systemd, exactly? This sounds like a rant that is only tangentially related, and demonstrates that you don't know why oddjobd exists (specifically to provide an encapsulated means by which unprivileged processes can safely perform privileged operations).

Just because you deem something overly complicated doesn't mean that it doesn't serve a practical purpose.

Re:GNU Mcron by parenthephobia on Saturday May 05, 2018 @02:58PM (#17003211)
oddjob isn't part of systemd and doesn't use systemd.
Re:GNU Mcron by liveoneggs on Saturday May 05, 2018 @01:19PM (#17002699)
systemd is attempting to take over unix just like gnome has always been trying to turn linux into GNOME-OS. It's all just a matter of having people with no taste given too much influence.
Re:GNU Mcron by qbrass on Saturday May 05, 2018 @04:42PM (#17003693)
The main code contributor to both projects is Red Hat.
Re:GNU Mcron by liveoneggs on Saturday May 05, 2018 @07:23PM (#17004427)
exactly. Ever used jboss? :)
Re:GNU Mcron by DC-3 on Saturday May 05, 2018 @12:53PM (#17002588)
Their point is a valid one though. I don't really think the init process is the right place for timers.
Re:GNU Mcron by derefr on Saturday May 05, 2018 @01:40PM (#17002788)
Maybe you've never tried to optimize an OS for battery life on mobile devices, then. There needs to be one place that timers happen—ideally the kernel, but a "userland kernel adjunct" like systemd is fine too—in order to be able to coalesce all the timers on the system (except for real-time ones) along some granularity scale.

You don't want to go to all the effort to spin up a CPU core to schedule a (cron) process thread, just to find out it has no work to do. Ideally, if you're going to check the time at all, you just want it done in one thread running on one core, so that the rest of the cores can stay asleep and you never have to spend energy context-switching when idle.

That being said, systemd isn't quite the right architecture for getting down to a "tickless everything" system. That'd be something more like WinNT's kernel timer object API, where the kernel sends an event to your window's or service's message inbox to wake you up when the timer is done; or macOS's "Grand Central Dispatch", where any native code (including non-Foundation POSIX code!) can pass scheduling control of any async block through a Mach trap over to one central scheduling process, which coalesces both timers and the runtimes of async events in general so that all background CPU activity happens in bursts with idles in between.

Re:GNU Mcron by theamk on Saturday May 05, 2018 @04:42PM (#17003697)
In my cronjob, I like to log the target process output, and ensure that only one timer jobs runs at a time, and apply resource limits, and have an easy way to know if the job is still running.

Right now, I am doing this all with a mess of shell scripts (flock + logger + echo calls + pgrep). This is fragile and ugly.

Since systemd provides all of the above easily, a better approach will be one-off systemd jobs. In this case, my crontab entries would be a trivial -- "1 3 * * * root systemctl start cronjob1". This only requires scheduling functionality -- background execution, env vars, email notification and other things no longer matter.

From there, it is just one small step to move scheduling into the init process itself -- after all, compared to what other things init does, scheduling is both simple and safe.

Re:GNU Mcron by s17tnet on Saturday May 05, 2018 @12:52PM (#17002585)
Init systems are intrinsically very complicated. Praise and thanks that someone out there do the shitty job to rewrite one that is not from the '70.
Re:GNU Mcron by twic on Saturday May 05, 2018 @01:02PM (#17002626)
Lots of people have written modern, clean, init systems that are not from the '70s, and have all managed to do so without creating all-consuming blobs like systemd.
Re:GNU Mcron by bitwize on Saturday May 05, 2018 @02:25PM (#17003048)
But do those init systems coalesce all system timers?
Re:GNU Mcron by craigsmansion on Saturday May 05, 2018 @02:18PM (#17003007)
"baked" and "arbitrary": that about sums up SystemD (because software that hobbled deserves to be camel cased) development.

> I can't imagine using a legacy solution anymore.

Good thing sane people are improving on the legacy space then, with mcron--the subject of the link before someone had to mention SystemD--being a case in point.