Sha256: 29035a681535098649ddc30090fc99a869669b8d70d67e58483619c87f926523

Contents?: true

Size: 363 Bytes

Versions: 4

Compression:

Stored size: 363 Bytes

Contents

require 'clockwork'
include Clockwork

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
clockwork-0.6.2 example.rb
clockwork-0.6.1 example.rb
clockwork-0.6.0 example.rb
clockwork-0.5.5 example.rb