Class: Boxafe::Scheduler::Launchd

Inherits:
Boxafe::Scheduler show all
Defined in:
lib/boxafe/scheduler/launchd.rb

Instance Method Summary collapse

Methods inherited from Boxafe::Scheduler

#initialize, platform_scheduler

Constructor Details

This class inherits a constructor from Boxafe::Scheduler

Instance Method Details

#startObject



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

def start
  stop
  plist.dump USER_AGENT
  plist.load!
end

#stopObject



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

def stop
  return false unless plist_exists?
  plist.unload!
  FileUtils.rm_f plist.file
end