Class: Rufus::Scheduler::SimpleJob
Overview
The base class of at/in/every jobs.
Instance Attribute Summary collapse
-
#at ⇒ Object
readonly
When the job is supposed to trigger.
-
#last ⇒ Object
readonly
Returns the value of attribute last.
Attributes inherited from Job
#block, #job_id, #last_job_thread, #params, #running, #scheduler, #t
Instance Method Summary collapse
- #determine_at ⇒ Object
-
#next_time ⇒ Object
Returns the next time (or the unique time) this job is meant to trigger.
Methods inherited from Job
#initialize, #schedule_info, #tags, #tags=, #trigger, #trigger_block, #unschedule
Constructor Details
This class inherits a constructor from Rufus::Scheduler::Job
Instance Attribute Details
#at ⇒ Object (readonly)
When the job is supposed to trigger
199 200 201 |
# File 'lib/rufus/sc/jobs.rb', line 199 def at @at end |
#last ⇒ Object (readonly)
Returns the value of attribute last.
201 202 203 |
# File 'lib/rufus/sc/jobs.rb', line 201 def last @last end |
Instance Method Details
#determine_at ⇒ Object
203 204 205 206 |
# File 'lib/rufus/sc/jobs.rb', line 203 def determine_at @at = Rufus.at_to_f(@t) end |
#next_time ⇒ Object
Returns the next time (or the unique time) this job is meant to trigger
210 211 212 213 |
# File 'lib/rufus/sc/jobs.rb', line 210 def next_time Time.at(@at) end |