Zhong
Useful, reliable distributed cron.
Installation
Add this line to your application’s Gemfile:
gem 'zhong'
Usage
r = Redis.new
Zhong.schedule(redis: r) do
category "stuff" do
every(5.seconds, "foo") { puts "foo" }
every(1.week, "baz", at: "mon 22:45") { puts "baz" }
end
category "clutter" do
every(1.second, "compute", if: -> (t) { rand < 0.5 }) { puts "something happened" }
end
end
TODO
- better logging
- error handling
- tests
- examples
- callbacks
- generic handler
History
View the changelog.
Contributing
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features