Class: Async::Cron::Schedule::Daily
- Defined in:
- lib/async/cron/schedule/daily.rb
Overview
A schedule that runs once per day, at midnight.
Instance Attribute Summary
Attributes inherited from Generic
Instance Method Summary collapse
Methods inherited from Generic
#initialize, #invoke, #run, #run_once
Constructor Details
This class inherits a constructor from Async::Cron::Schedule::Generic
Instance Method Details
#increment(time = nil) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/async/cron/schedule/daily.rb', line 14 def increment(time = nil) time = Time.from(time) || Time.now time.seconds = 0 time.minutes = 0 time.hours = 0 time.days += 1 return time.normalize! end |