Class: Allora::Job::CronJob
- Inherits:
-
Allora::Job
- Object
- Allora::Job
- Allora::Job::CronJob
- Defined in:
- lib/allora/job/cron_job.rb
Overview
A classic cron style job, with support for seconds.
Instance Attribute Summary
Attributes inherited from Allora::Job
Instance Method Summary collapse
-
#initialize(cron_str, &block) ⇒ CronJob
constructor
Initialize the CronJob with the given cron string.
- #next_at(from_time) ⇒ Object
Methods inherited from Allora::Job
Constructor Details
#initialize(cron_str, &block) ⇒ CronJob
Initialize the CronJob with the given cron string.
36 37 38 39 40 |
# File 'lib/allora/job/cron_job.rb', line 36 def initialize(cron_str, &block) super(&block) @cron_line = CronLine.new(cron_str) end |
Instance Method Details
#next_at(from_time) ⇒ Object
42 43 44 |
# File 'lib/allora/job/cron_job.rb', line 42 def next_at(from_time) @cron_line.next_time(from_time) end |