Class: Magnesium::scheduler
- Inherits:
-
Object
- Object
- Magnesium::scheduler
- Defined in:
- lib/magnesium/extensions/scheduler.rb
Instance Attribute Summary collapse
-
#execute ⇒ Object
Returns the value of attribute execute.
-
#period ⇒ Object
Returns the value of attribute period.
Class Method Summary collapse
-
.at ⇒ Object
(period,execute).
-
.cron ⇒ Object
(period,execute).
-
.every ⇒ Object
(period,execute).
-
.in ⇒ Object
(period,execute).
Instance Attribute Details
#execute ⇒ Object
Returns the value of attribute execute.
6 7 8 |
# File 'lib/magnesium/extensions/scheduler.rb', line 6 def execute @execute end |
#period ⇒ Object
Returns the value of attribute period.
5 6 7 |
# File 'lib/magnesium/extensions/scheduler.rb', line 5 def period @period end |
Class Method Details
.at ⇒ Object
(period,execute)
20 21 22 23 24 |
# File 'lib/magnesium/extensions/scheduler.rb', line 20 def self.at #(period,execute) scheduler.at '#{@period}' do @execute end end |
.cron ⇒ Object
(period,execute)
26 27 28 29 30 |
# File 'lib/magnesium/extensions/scheduler.rb', line 26 def self.cron #(period,execute) scheduler.cron '#{@period}' do @execute end end |
.every ⇒ Object
(period,execute)
8 9 10 11 12 |
# File 'lib/magnesium/extensions/scheduler.rb', line 8 def self.every #(period,execute) scheduler.every '#{@period}' do @execute end end |
.in ⇒ Object
(period,execute)
14 15 16 17 18 |
# File 'lib/magnesium/extensions/scheduler.rb', line 14 def self.in #(period,execute) scheduler.in '#{@period}' do @execute end end |