Rethinking Cron
adam.heroku.com
adam.heroku.com
When you adopt a new scheduler, you're inevitably creating work for your enterprise. It's yet another thing that must be learned and documented. There may be a new syntax to learn, which will mean you're incurring training costs (and the cost of errors) down the line.
Programmers love to improve things, but there's a real world cost to change that can't be ignored. cron may be archaic and lacking power, but it's well understood.
As for enterprise schedulers, they've been around for years. Off the top of my head, I've worked with 'Autosys', and 'Appworx'. These were robust, enterprise-ready schedulers that supported conditional execution, locks, as well as their own scripting language.
So the sysadmins will still use cron to do the infrastructure type jobs. But when a programmer needs something in his app to be scheduled he can use the replacement, this also frees them up from asking the sysadmin to install a cron script.
This is my favorite thing to complain about with cron. I can't believe that there's still not a way to test run cron entries. So far I just add > tmp.out >> tmp.err, set it to run every minute, and wait.
I completely agree that there should be a better, direct way to test cron jobs.
It works great for us. It's centralized, has a web interface, and is already familiar to everyone on the team (we already used Hudson for CI). It has a ton of plugins, so notifications, single sign-on, and a host of other desired features were no problem to bolt on.
Here's a quick post from a few months back on why we chose Hudson: http://dev.bizo.com/2009/11/using-hudson-to-manage-crons.htm...
And some more general information here [2]
[1] http://upstart.ubuntu.com/faq.html#replace-cron
[2] http://www.netsplit.com/2006/09/01/upstart-can-now-replace-s...
And this functionality should be easily available to all applications. If I want to send a specific email at noon, or backup my laptop drive every night at 3am only when on my home network, etc., I should be able to without using 5 different daemons or programs kept running in the background and hacked-together scripts.
@reboot /run/a/programWhile cron is clearly pushed way past its capabilities by many people (without always realizing it), this strikes me as a reinvention of something that's been around forever: the batch system.
If the goals are improved reliability, management, fault-tolerance, etc., you'd be better off using mature software that was designed to solve this problem, and already has good community support, like Condor.
(incidentally, check your pull requests :)
Also, I personally don't feel that using XML as a config file format is necessarily an improvement over what cron offers now. (I know that I'm skipping the fact that 'XML is self-validating,' but I don't really find a lack of a self-validating config file to be a major issue with cron)
At first I was kind of upset that this condition was there, but in retrospect it might have been a very wise design choice to stop runaway triggers.
> At first I was kind of upset that this condition was there, but in retrospect it might have been a very wise design choice to stop runaway triggers.
It doesn't really stop runaway triggers if all of the scripts have a 'sleep 60' at the end of them. And if you are concerned about runaway triggers you could always make the rule something like "bail if the process dies after <60s more than once in a 2-minute period" or similar since there are legitimate processes out there that take less than 60 seconds to run.