{"repo":"jjb/ruby-clock","free":true,"listed":false,"github":"https://github.com/jjb/ruby-clock","clone":"git clone https://github.com/jjb/ruby-clock.git","description":"A ruby job scheduler which runs jobs each in their own thread in a persistent process.","language":"Ruby","stars":89,"topics":["scheduler","cron"],"license":"MIT","category":"workflow-automation","readme_excerpt":"ruby-clock ruby-clock is a job scheduler, known by heroku as a clock process. In many cases it can replace the use of cron. Why another ruby scheduler project? See this feature matrix of the space. Feel free to leave a comment with suggestions for changes or additions. This gem is very small with very few lines of code. For all its scheduling capabilities, it relies on the venerable rufus-scheduler. rufus-scheduler does not aim to be a standalone process or a cron replacement, ruby-clock does. Jobs are all run in their own parallel threads within the same process. The clock process will respond to signals INT ( ^c at the command line) and TERM (signal sent by environments such as Heroku and other PaaS's when shutting down). In both cases, the clock will stop running jobs and give existing jobs 29 seconds to stop before killing them. You can change this number with RUBY CLOCK SHUTDOWN WAIT SECONDS in the environment. Installation ruby = 3.0 is required. Add this to your Gemfile: And then execute: $ bundle install Or install it yourself as: $ gem install ruby-clock Usage Create a file named Clockfile. This will hold your job definitions. Define jobs like this: To start your clock process: bundle exec clock To use a file other than Clockfile for job definitions, specify it. This will ignore Clockfile and only read jobs from clocks/MyClockfile: bundle exec clock clocks/MyClockfile You can also load multiple files with one invocation (although a better approach might be to load yo","default_branch":null,"files":null,"tree":[],"storefront":"/r/jjb","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jjb/ruby-clock/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}