Jobber: A replacement for cron, with status-reporting and error-handling
dshearer.github.io
dshearer.github.io
I don't mind a bit of humanity in my soul-less machines
If you write code for yourself then that's one thing, as soon as you write code for potential distribution to a large audience (cron is present on just about any unix machine) then I think you should restrain yourself from trying to be funny (or at a minimum from having your software by proxy call people names).
Call me old fashioned, it just doesn't work for me.
On the other hand, IMO, the biggest profanity you can put in an error message is an error code and nothing more. Now THAT is how to mistreat your users!
I wonder if there were similar discussions about the insults sudo gives you on OpenBSD (http://prefetch.net/blog/index.php/2012/08/01/sudo-insults-w...)...
fmt.Fprintf(os.Stderr, "Specify a command, asshole.\n\n")
Rather than the current:
fmt.Fprintf(os.Stderr, "Please specify a command.\n\n")
Not realizing this at first caused me a fair amount of confusion about what everyone was talking about.
https://github.com/dshearer/jobber/commit/7766f3fc2d61ba8008...
I'll give the benefit of the doubt and say this was an accidental commit after a frustrating debugging session but yeah, don't do this to your users.
Link for systemd.timer: http://www.freedesktop.org/software/systemd/man/systemd.time...
And some discussion of using it to replace cron: https://wiki.archlinux.org/index.php/Systemd/Timers#As_a_cro...
Jobber is really just cron + support for error-recovery strategies like exponential backoff + support for getting the job execution history. It is very simple to deploy: it consists of just two (native) binaries, and has no dependencies (well, other than Bash).
Chronos also supports these additional features (although I don't know about exponential backoff), but Chronos is much more ambitious than Jobber. Probably the biggest differences are that Chronos supports farming jobs out to other nodes and that it supports dependencies between jobs. And of course Chronos has a nice GUI. On the other hand, I imagine it's a bigger deal to deploy, although I haven't done so myself.
So, if you have a bunch of related jobs that need to run on multiple nodes, Chronos would probably be best. Otherwise, try Jobber!
(Shameless plug) - for those people that have to stick with cron (and cant switch to Jobber) and need status report and error handling I have a SaaS that handles this. See my bio for details.
I think I would have made a script to sit in-between, standard cron and third party software to solve the recovery problem where needed.
https://github.com/javan/whenever
Wraps cron so you don't have to. Integrates with Capistrano.
It's not like Cron covers all our needs...
The "do one simple thing and do it well" principle worked best for the simple needs of late '70s OSes.
In 2014 it ends up with MORE (not LESS) complexity, built on top of those simple tools to coordinate them to do anything useful. And of course they're not even that smart in how they work together...
Like "make" has grown configure and autoconf and all that cruft (because we "kept it simple").
About your off-topic comment: autoconf/automake adds crazy complexity. I avoid it as much as possible, using just Make (it allows you context detection and lots of conditional handling, without complicating things).
# Handwritten configure script.
# =============================
#
# Before you suggest I use tools for this, please read:
#
# https://www.varnishcache.org/docs/trunk/phk/autocrap.html
# and
# http://queue.acm.org/detail.cfm?id=2349257
#
from https://github.com/bsdphk/Ntimed/blob/master/configure