Class: Rufus::Scheduler::EveryJob
- Defined in:
- lib/rufus/sc/jobs.rb
Overview
Recurring job with a certain frequency.
Instance Attribute Summary collapse
-
#frequency ⇒ Object
readonly
The frequency, in seconds, of this EveryJob.
Attributes inherited from SimpleJob
Attributes inherited from Job
#block, #job_id, #last, #last_job_thread, #params, #scheduler, #t
Instance Method Summary collapse
-
#initialize(scheduler, t, params, &block) ⇒ EveryJob
constructor
A new instance of EveryJob.
-
#trigger ⇒ Object
Triggers the job (and reschedules it).
Methods inherited from SimpleJob
Methods inherited from Job
#pause, #paused?, #resume, #running, #schedule_info, #tags, #tags=, #trigger_block, #unschedule
Constructor Details
#initialize(scheduler, t, params, &block) ⇒ EveryJob
Returns a new instance of EveryJob.
347 348 349 350 351 352 353 |
# File 'lib/rufus/sc/jobs.rb', line 347 def initialize(scheduler, t, params, &block) super determine_frequency determine_at end |
Instance Attribute Details
#frequency ⇒ Object (readonly)
The frequency, in seconds, of this EveryJob
345 346 347 |
# File 'lib/rufus/sc/jobs.rb', line 345 def frequency @frequency end |
Instance Method Details
#trigger ⇒ Object
Triggers the job (and reschedules it).
357 358 359 360 361 362 |
# File 'lib/rufus/sc/jobs.rb', line 357 def trigger schedule_next super end |