3

My clockwork script.rb looks like:

module Clockwork
  configure do |config|
    config[:sleep_timeout] = 1
    config[:tz] = 'EST'
    config[:max_threads] = 15
    config[:thread] = true
  end

  handler do |job|
    puts 'job triggered'
  end

  every(1.day, 'test', at: '13:00')
end

If I run this on my laptop, which is in EST time, at '12:58', and then wait until '13:01', no event is ever triggered. Also, to be clear, the time listed in clockworks output when it starts up is the correct EST time, so this does not appear to be a timezone problem.

If I instead run something like every(1.minute, 'test'), it works as expected.

Why is the at: not working in the above?

Jonah
  • 15,806
  • 22
  • 87
  • 161

0 Answers0