README.md in clockwork-0.5.1 vs README.md in clockwork-0.5.2
- old
+ new
@@ -39,10 +39,15 @@
it as the module (thanks to [hoverlover](https://github.com/hoverlover/clockwork/)).
require 'clockwork'
module Clockwork
+
+ configure do |cofig|
+ config[:tz] = "America/Chicago"
+ end
+
handler do |job|
puts "Running #{job}"
end
every(10.seconds, 'frequent.job')
@@ -140,10 +145,10 @@
Run on every first day of month.
Clockwork.every(1.day, 'myjob', :if => lambda { |t| t.day == 1 })
-The argument is an instance of `Time`. If `:tz` option is set, it is local time.
+The argument is an instance of `ActiveSupport::TimeWithZone` if the `:tz` option is set. Otherwise, it's an instance of `Time`.
This argument cannot be omitted. Please use _ as placeholder if not needed.
Clockwork.every(1.second, 'myjob', :if => lambda { |_| true })