14 ms·
GNU Mcron
- jdormit 8y agoFrom the project documentation [0]: > The mcron program represents a complete re-think of the cron concept originally found in the Berkeley and AT&T unices "Unices" as in the plural of "Unix"? I've never heard that before, but that's amazing. [0] https://www.gnu.org/software/mcron/manual/mcron.html https://www.gnu.org/software/mcron/manual/mcron.html
- jstimpfle 8y agoIt's a common term.
- deleted 8y ago[deleted]
- Semirhage 8y agoThe Latinate -ix suffix becomes -ice/s when pluralized, as in matrix and matrices, or dominatrix and dominatrices.
- jimnotgym 8y agoBut...UNIX is not Latin, but seems to be a corruption of an English acronym. So a pedant may argue that this is incorrect.
- arundelo 8y ago“[A]lmost anything ending in ‘x’ may form plurals in ‘-xen’ (see VAXen and boxen in the main text). Even words ending in phonetic /k/ alone are sometimes treated this way; e.g., ‘soxen’ for a bunch of socks. Other funny plurals are the Hebrew-style ‘frobbotzim’ for the plural of ‘frobbozz’ (see frobnitz) and ‘Unices’ and ‘Twenices’ (rather than ‘Unixes’ and ‘Twenexes’; see Unix, TWENEX in main text). [...] The pattern here [...] is generalization of an inflectional rule that in English is either an import or a fossil (such as the Hebrew plural ending ‘-im’, or the Anglo-Saxon plural suffix ‘-en’) to cases where it isn't normally considered to apply. This [...] is grammatical creativity, a form of playfulness.” http://catb.org/jargon/html/overgeneralization.html http://catb.org/jargon/html/overgeneralization.html
- bitwize 8y agoPeople do it anyway for giggle value. I was using "Pentia" as the plural for "Pentium" soon after the original chip dropped.
- lillesvin 8y agoHowever, -es (as in "unixes") should be perfectly acceptable too. Just like how "indixes" and "matrixes" are fine in English.
- deleted 8y ago[deleted]
- BalinKing 8y agoThere's also "x"/"cs" -> "xen"/"csen" (a la "ox" -> "oxen"). See: Emacs -> Emacsen
- blunte 8y agoLike indices vs indexes, either of which is generally accepted as valid.
- earenndil 8y agoYep! Same for linux -> linuces.
- thanatropism 8y agoLost opportunity: EmaGNUel Mcron.
- eat_veggies 8y agoThat's a pretty good pun, but I'm not sure it's wise to attach this project to a politician's name.
- agumonkey 8y agoopen presidency ?
- dethswatch 8y agoIt wouldn't hurt to tell us what this actually is in the title. "Gnu Mcon- a 100% compatible replacement for Vixie cron" Would be a -way- better title. HN seems to love to announce random products and updates without telling anyone who doesn't already know what it is. "Gnu Squanchydoo v3 released!" TF is "Squanchydoo"? No idea, not going to bother to find out...
- jimnotgym 8y agoIt wouldn't hurt for the website linked to tell us what the package does at least somewhere on the page, I will agree with that much. The first paragraph tells me what it replaces, what language it is coded in and who wrote it...but not what it does.
- suprfnk 8y agoWould you not consider cron to be 'general knowledge' in the Hacker News community?
- s3m4j 8y agoI would, but I also would like to know in what way is it different from vixie cron and what impact does it have on the user ?
- rbanffy 8y agoIt says exactly that. It's written in Guile (which is inconsequential until it reaches the second part) and can take Scheme code as configuration file (which is very interesting).
- s3m4j 8y agoI read that, but to the end user, that's not really a plus if the "old" syntax works the same. How does mcron's working differ from cron's ? That's what should be on the front page, not the language its written in.
- amelius 8y agoI make backups using cron, and recently I've been wondering what happens if the backup (hypothetically) takes longer than the interval between cron jobs. Will it start the new job while the old one is still running? Will unrelated cron jobs be blocked? And how is that in Mcron?
- gmjosack 8y agoYes. If you're worried about this you can take a look at `flock`. e.g. flock -xn /path/to/lock -c /path/to/command
- jamroom 8y agoYes - I believe it will start the new job while the old one is running - your backup script should write a PID file to ensure it isn't already running.
- pastage 8y agoSystemd solves this at least, but I do like cron better.
- John_KZ 8y agoSo it's like regular Mcron except without anti-union policies?
- jrq 8y agoI love that GNU loves Guile. There are few Scheme implementations as well polished as guile is, and what a breath of fresh air it can be to sit down to some '() stew after a few rough weeks of spreadsheet hell at work. Might be just me, but it's kind of like having another universe to take a vacation in. It does make me miss types, doing data structure programming in scheme can be irritating I guess, but still. I can compose, I can syntax-rules if I wanted, etc. The sexpr universe isn't dead yet.
- gnulinux 8y agoIs it really "another universe" for most people? I thought python is a pretty popular language and it's hardly more type-safe than scheme.
- jrq 8y agoI don't understand what you're asking. Python is completely unlike scheme. The type situation irks me because I do ocaml for a living, so I rely on the type system a lot. Scheme reminds me of a more seductive flavor of FP, though sometimes it's cumbersome to ensure that a data structure isn't being subtly changed somewhere.
- eadmund 8y agoIt's a pity GNU doesn't use Common Lisp instead of Scheme — it has rich types, data structures & more. It's a language built for programming large systems, rather than teaching small examples.
- jrq 8y agoR7RS large is underway now! CL also has unhygienic macros, non-lispy loop grossness, lots of cruft, lots of poorly named functions that are named two different ways in two different places, and generally reeks of the 70s. Scheme actually tried to compete with CL once, with a language called T. It had something sorta similar to CLOS and if I recall it was aiming for optimized performance per Sussman and Steele, but it eventually languished. SBCL is the only thing keeping CL alive and they don't have the wherewithall to begin a modernized spec. I don't hate CL, but I LOVE scheme. It is much more pleasant to actually work in, and feels cleaner. All the potholes of CL leave me checking under my fingernails for grime.
- niftich 8y agoNot sure what the OP intended as the context around this submission, but here's some more info: Latest version 1.1.1 released 2018-04-08 [1][2]. Previous version was 1.1 on 2018-03-19, and the one before that dates to 2010-06-13 [2]. This is a job scheduler compatible with vixie-cron [3], but written in Guile Scheme. Entries in a crontab file can be the traditional format, or snippets of Guile. There's a whitepaper from 2003 [4] and up-to-date documentation [5] that explain the rationale and usage. [1] http://lists.gnu.org/archive/html/info-gnu/2018-04/msg00004.html http://lists.gnu.org/archive/html/info-gnu/2018-04/msg00004.... [2] http://savannah.gnu.org/projects/mcron/ http://savannah.gnu.org/projects/mcron/ [3] https://directory.fsf.org/wiki/Vixie-cron https://directory.fsf.org/wiki/Vixie-cron [4] https://www.gnu.org/software/mcron/design.html https://www.gnu.org/software/mcron/design.html [5] https://www.gnu.org/software/mcron/manual/mcron.html https://www.gnu.org/software/mcron/manual/mcron.html
- otterley 8y agoNow 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.timer.html https://www.freedesktop.org/software/systemd/man/systemd.tim...
- userbinator 8y agoI'm not surprised. systemd reinventing and horribly overcomplicating things is nothing new.
- otterley 8y agoDo you have substantive feedback about the systemd timer implementation, or are you just here to shitpost?
- nimbius 8y agono, 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
- 8y ago
- userbinator 8y agoand allows configuration files to be written in scheme (as well as Vixie's original format) for infinite flexibility in specifying when jobs should be run. It looks like Greenspun's Tenth Rule has been taken to the next level. Software that's so configurable its configuration files itself are written in a Turing-complete language is the bane of enterprise development. IMHO if you need such complex requirements, that should be done by something other than the configuration file of what should be a simple task scheduler.
- bjoli 8y agoIt might just be me, but I like being able to use a scheme file instead of a bash file if I need more complex logic for the command to execute. It gives you standard vixie Cron AND the possibility to handle everything as a scheme program. You just put a scheme file in your Cron dir and have the logic in there. Really not much different from executing a shell file from regular Cron.
- fulafel 8y agoI guess calling Guile an "ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp" could be a clever salvo in a religious war between Scheme and Common Lisp programmers, but of course Mcron's approach is heeding Greenspun's implied advice.
- sevensor 8y agoI think this is the crux of the argument between proponents of simpler init systems and proponents of systemd. We have complex requirements implemented in complex logic. Do we want that complexity baked into the init system, or do we want that in our configuration language?
- gkya 8y agoThat rule is plain wrong. Not everything compose well enough to make pipelines or configure with some booleans and numbers and strings. Sometimes you need custom behaviour. In fact, most of the time you want custom behaviour, or just minor modifications or hooks. IDK what uses there can be for custom behaviour in a cron task, but that is the key: that you can not know every use case before hand. And instead of fighting with users over what features and configurables to enable, allowing them to do what they want is just easier and better. Moreover, "a simple task scheduler" is a simple task scheduler. It's written in 1500 lines of scheme code, another commenter quotes.
- sidhu1f 8y agoSome of Mcron's innovations[1]: > The new idea is to read the required command instructions, work out which command needs to be executed next, and then sleep until the inferred time has arrived. On waking the commands are run, and the time of the next command is computed. > Each user looks after his own files in his own directory. He can use more than one to break up complicated cron specifications. Each user can run his own daemon. This removes the need for suid programs to manipulate the crontabs, and eliminates many security concerns that surround all existing cron programs. > Vixie cron is implemented in 4500 lines of C code; mcron is 1500 lines of scheme, despite the fact that it offers many more features and much more flexibility, and complete compatibility with Vixie cron. [1] https://www.gnu.org/software/mcron/design.html https://www.gnu.org/software/mcron/design.html
- JdeBP 8y agoOne would have to check the timeline to determine whether the second was, in fact, an Mcron innovation. Uwe Ohse's uschedule, which has been around since 2001, also works by individual users having files in their own directories with their own daemons. * https://ohse.de./uwe/uschedule.html https://ohse.de./uwe/uschedule.html * http://jdebp.eu./Softwares/uschedule/ http://jdebp.eu./Softwares/uschedule/
- mrb 8y agoGuile syntax to run every second Sunday of the month (example taken directly from the manual https://www.gnu.org/software/mcron/manual/mcron.html#Every-second-Sunday https://www.gnu.org/software/mcron/manual/mcron.html#Every-s...): (job (lambda (current-time) (let* ((next-month (next-month-from current-time)) (first-day (tm:wday (localtime next-month))) (second-sunday (if (eqv? first-day 0) 8 (- 14 first-day)))) (+ next-month (* 24 60 60 second-sunday)))) "my-program") Meanwhile in cron (second Sunday falls between the 8th and 14th day of the month, and it is the 7th day of the week): 0 0 8-14 * * [ `date +\%u` = 7 ] && my-program I think I'll stick with cron.
- JD557 8y agoCouldn't that cronjob simply be: 0 0 8-14 * 0? (I think 0 is Sunday)
- mrb 8y agoNo because the dom field (8-14) and dow field (0) are treated as a logical OR by cron, not AND.
- gnulinux 8y agoI can't see how second syntax is better than the first one. I've never used GNU mcron but I know exactly what the first code is doing.
- xelxebar 8y agoThis is a nice misrepresentation. Your Vixie cron example offloads the day of week check to `date`. I'm sure there are examples where mcron syntax is superior to anacron as well. I didn't know about mcron until this post either, but I find it super frustrating when people dismiss tools, ideas, or people simply because they don't conform to familiar patterns.
- deleted 8y ago[deleted]
- 8y ago
- blunte 8y agoFor people who've never heard of this, the project home page is really missing a simple opportunity to actually say "what is this Mcron thing?" It wouldn't have been too difficult to take the small introduction from here: https://www.gnu.org/software/mcron/manual/html_node/Introduction.html#Introduction https://www.gnu.org/software/mcron/manual/html_node/Introduc...
- andrewshadura 8y agoReminds me of a Windows-only nnCron, written in Forth.
- equalunique 8y agoMcron is included by default in GNU's Guile-centric GuixSD OS.