Sha256: e07379a566dc5cb1441df718bd38e0d28b02039623426c21922cc2b0efc067b2
Contents?: true
Size: 415 Bytes
Versions: 4
Compression:
Stored size: 415 Bytes
Contents
require "ruby-clock/version" require 'rufus-scheduler' module RubyClock def shutdown puts "Shutting down 🐈️ 👋" puts Rufus::Scheduler.singleton.shutdown(wait: 29) exit end def listen_to_signals Signal.trap('INT') { shutdown } Signal.trap('TERM') { shutdown } end def schedule Rufus::Scheduler.singleton end def run_jobs Rufus::Scheduler.singleton.join end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ruby-clock-0.4.0 | lib/ruby-clock.rb |
ruby-clock-0.3.0 | lib/ruby-clock.rb |
ruby-clock-0.2.0 | lib/ruby-clock.rb |
ruby-clock-0.1.0 | lib/ruby-clock.rb |