Class: MultiScheduler::Launchd

Inherits:
Schedule
  • Object
show all
Defined in:
lib/multi_scheduler/schedule/launchd.rb

Instance Attribute Summary

Attributes inherited from Schedule

#command, #command_arguments, #identifier

Instance Method Summary collapse

Methods inherited from Schedule

#initialize

Constructor Details

This class inherits a constructor from MultiScheduler::Schedule

Instance Method Details

#startObject



8
9
10
11
12
# File 'lib/multi_scheduler/schedule/launchd.rb', line 8

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

#stopObject



14
15
16
17
18
# File 'lib/multi_scheduler/schedule/launchd.rb', line 14

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