Hacker News new | ask | show | jobs
by jeremyw 4843 days ago
I'll mention solving a lateral problem. We liked crond fine, but wanted a minimal impact way to make crons to survive machine stalls, they needed to consistently run somewhere.

So a small bit of Python is enough to perform ephemeral leader election -- for the current minute -- in Zookeeper. Prefixed to otherwise stock invocations a set of machines run the same thing, one of them wins, nobody gets paged.

  * * * * * my long and winding command
  [becomes]
  * * * * * cron-coord somename my long and winding command