Distributed cron lock written in go with a UI for visualizing current crons and their status.
But why?
This allow you to have multiple cron servers running the same crons for high availability. Cronlock will prevent a cron from being executed on multiple hosts. The first and fastest cron host gets to execute the cron. You can easily upgrade or perform maintenance on one or more crons and still have reliable crons.
You must have a running Redis server for cronlock to work.
brew install redis
Start the redis server:
brew services start redis
Stop the redis server:
brew services stop redis
Generate the cronlock
and cronlockweb
binaries.
make
Without cron:
./cronlock sleep 60
With cron:
* * * * * cronlock sleep 60
make web
HTML templates should be in the working directory of the ./cronlockweb
binary.
Run all the tests:
make tests
Remove the binaries
make clean