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, #running, #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
#schedule_info, #tags, #tags=, #trigger_block, #unschedule
Constructor Details
#initialize(scheduler, t, params, &block) ⇒ EveryJob
Returns a new instance of EveryJob.
257 258 259 260 261 |
# File 'lib/rufus/sc/jobs.rb', line 257 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
255 256 257 |
# File 'lib/rufus/sc/jobs.rb', line 255 def frequency @frequency end |
Instance Method Details
#trigger ⇒ Object
Triggers the job (and reschedules it).
265 266 267 268 269 270 |
# File 'lib/rufus/sc/jobs.rb', line 265 def trigger schedule_next super end |