adding consul-do Do something based on leadership status
https://github.com/zeroXten/consul-do
From README.md
Useful for running cronjobs in HA mode.
Run something like this on two or more servers:
* * * * * /usr/bin/consul-do JOB-1 $(/bin/hostname) && /path/to/job1
*/10 * * * * /usr/bin/consul-do JOB-2 $(/bin/hostname) && /path/to/job2
Only one of the servers will be elected leader and will therefore run the job. Should the leader fail, a follower will take over.