Categories
bitching server admin

Please, someone, destroy cron. Forever.

Just wanted to say: I detest “cron” more than mere words have the power to convey. I suspect there aren’t many other pieces of fundamental software implemented in so few lines of code that over so many years have caused so much harm and frustration to so many people and systems (surprisingly, cron has often been the point of error in weird failures of clusters of servers I’ve dealt with – e.g. when the backups mysteriously stop working, or an app crashes and won’t restart, etc)

(I just spent an hour debugging a problem only to discover it’s because someone had committed the cardinal sin – oh, how foolish of them! – of including an extension on the end of the cron file. That’s right – it silently ignores files whose filename includes an extension. The manpages say what characters are allowed in a filename, but were written in a Time Before File Extensions, and fail to mention that they have to be interpretted as literally and pedantically as possible. This is not the first time I’ve seen people read that manpage – multiple times – and yet fail to realise this)

FYI, if you don’t know cron: the main problem is that – unlike most other parts of the modern sysadmin infrastructure – it has no error reporting if things go wrong. It has a built-in attempt to “send local email to the user on the current server” (which IME these days often as not doesn’t work – few sysadmins use local mail any more as the primary maintenance system, and many systems I see in the wild do not have a working local mail delivery (I don’t know why – is it by default disabled on some distros? I don’t even know *how* you would disable it, whilst still having the “mail” command installed)) – and no option to simply log errors to a file. You can tell it to log errors to a file, but it won’t even process that command unless the main command itself at least partly executes.

I am hoping that one day, soon, we can all switch every system over to Upstart or similar. Currently at version 0.5.0, I pray for the day that this becomes part of the standard Debian install, and that I never again encounter cron.

And then maybe a decade later I can see “make” for the last time too, and I can banish the last of the painful memories of Unix sysadmin.

3 replies on “Please, someone, destroy cron. Forever.”

Make isn’t so bad, it’s just picky. And when you figure it out you’ve invested so much pain that instead of building a tool to create Makefiles quickly and easily you just roll over and pant.

It’s kind of like if someone lobbed a grenade through the window and you jumped in the tub just in time to shield you from the blast. Immediately after it goes off you should run over and shut the window but you just want to sit there and be alive.

That’s an awesome quote to describe Make, I’ll have to remember that one :).

My other favourite is this one:

“make was a really good project for a college student [to implement] 20 years ago.”
— Tim Leonard, Intel Massachusetts Microprocessor Design Center

Comments are closed.