Module: Whenever

Defined in:
lib/base.rb,
lib/version.rb,
lib/job_list.rb,
lib/command_line.rb,
lib/outputs/cron.rb,
lib/job_types/runner.rb,
lib/job_types/default.rb,
lib/job_types/rake_task.rb

Defined Under Namespace

Modules: Job, Output, VERSION Classes: CommandLine, JobList

Class Method Summary collapse

Class Method Details

.cron(options) ⇒ Object



27
28
29
# File 'lib/base.rb', line 27

def self.cron(options)
  Whenever::JobList.new(options).generate_cron_output
end

.intervalsObject

Add more intervals here as we decide to support them for editing

Intervals supported by Whenever::Output::Cron: Times

- minutes
- hours
- days
- months

Symbols

- :reboot
- :year, :yearly
- :day, :daily
- :midnight
- :month, :monthly
- :week, :weekly
- :hour, :hourly

Strings

- sun, mon, tue, wed, thu, fri, sat
- weekday
- weekend


23
24
25
# File 'lib/base.rb', line 23

def self.intervals
  %w(days months)
end

.pathObject



31
32
33
34
35
36
37
# File 'lib/base.rb', line 31

def self.path
  if defined?(RAILS_ROOT)
    RAILS_ROOT 
  elsif defined?(::RAILS_ROOT)
    ::RAILS_ROOT
  end
end