Class: Boxafe::Scheduler

Inherits:
Object
  • Object
show all
Defined in:
lib/boxafe/scheduler.rb

Direct Known Subclasses

Cron, Launchd

Defined Under Namespace

Classes: Cron, Launchd

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Scheduler

Returns a new instance of Scheduler.



13
14
15
# File 'lib/boxafe/scheduler.rb', line 13

def initialize options = {}
  @options = options
end

Class Method Details

.platform_scheduler(options = {}) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/boxafe/scheduler.rb', line 4

def self.platform_scheduler options = {}
  case RbConfig::CONFIG['host_os']
  when /darwin/i
    Boxafe::Scheduler::Launchd.new options
  else
    Boxafe::Scheduler::Cron.new options
  end
end