Class: Whenever::Job::Runner

Inherits:
Default
  • Object
show all
Defined in:
lib/job_types/runner.rb

Instance Attribute Summary

Attributes inherited from Default

#at, #cron_log, #task

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Runner

Returns a new instance of Runner.



5
6
7
8
# File 'lib/job_types/runner.rb', line 5

def initialize(options = {})
  super(options)
  @file = !!options[:file]
end

Instance Method Details

#outputObject



10
11
12
13
# File 'lib/job_types/runner.rb', line 10

def output
  path_required
  %Q(#{File.join(@path, 'script', 'runner')} -e #{@environment} #{@file ? task : %Q("#{task}") })
end