5 ms·
Except that cron is simpler and more widely deployed (e.g. traditional unixes and *bad). I can't imagine cron ever going away.
by jimktrains2 8y ago
Except that cron is simpler and more widely deployed (e.g. traditional unixes and *bad). I can't imagine cron ever going away.
- _eht 8y agoIt reminds me of ed, vi and nano. Their distributions with unix and linux can be counted on pretty safely to exist.
- qbrass 8y agoI wouldn't count on nano to be there outside of Linux distros.
- jcelerier 8y ago> 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-quartz.html https://www.freeformatter.com/cron-expression-generator-quar...) to convert from readable time to cron specifications ? Meanwhile, sd is just [Timer] OnCalendar=weekly
- Karrot_Kream 8y agoSure 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.
- jcelerier 8y ago> 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.
- JdeBP 8y agoThat 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.
- syrrim 8y ago>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.
- otterley 8y agoHow about monotonic timers? cron doesn't have those.
- jimktrains2 8y agoWhich cron? There isn't only a single cron.
- otterley 8y agoVixie cron, the standard one nearly everyone used to use.
- JdeBP 8y agoThe 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.
- jimktrains2 8y ago> 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?
- userbinator 8y agoWhat'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.time.html https://www.freedesktop.org/software/systemd/man/systemd.tim...
- otterley 8y agoMonday at midnight, pretty simple. If you care what day/time the "weekly" event occurs at, the "weekly" literal is not for you.
- jimktrains2 8y ago> Monday at midnight, pretty simple Why is that simple? Monday isn't even the first day of the week!
- tscs37 8y agoMonday 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.
- jimktrains2 8y agoSure, 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...
- calcifer 8y ago> *bad ?
- syrrim 8y agoProbably s/a/s/.
- Mononokay 8y agoMy guess is that he mistyped *BSD.
- jimktrains2 8y agoYeah, as siblings said, BSD. I'm past the edit period :-/