Sha256: 60488750ac0f4d9a0ea8422147bf3da4cbbf039225832e6e6fd04ac6ee9d00ab
Contents?: true
Size: 564 Bytes
Versions: 5
Compression:
Stored size: 564 Bytes
Contents
require 'tickwork' module Tickwork handler do |job| puts "Queueing job: #{job}" end every(10.seconds, 'run.me.every.10.seconds') every(1.minute, 'run.me.every.minute') every(1.hour, 'run.me.every.hour') every(1.day, 'run.me.at.midnight', :at => '00:00') every(1.day, 'custom.event.handler', :at => '00:30') do puts 'This event has its own handler' end # note: callbacks that return nil or false will cause event to not run on(:before_tick) do puts "tick" true end on(:after_tick) do puts "tock" true end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
tickwork-0.9.2 | example.rb |
tickwork-0.9.1 | example.rb |
tickwork-0.9.0 | example.rb |
tickwork-0.1.0 | example.rb |
tickwork-0.0.1 | example.rb |