15 lines
358 B
Ruby
15 lines
358 B
Ruby
#!/usr/bin/env ruby
|
|
|
|
require 'rake'
|
|
require 'optparse'
|
|
require 'whenever'
|
|
|
|
task = "whenever:output_cron"
|
|
|
|
OptionParser.new do |opts|
|
|
opts.banner = "Usage: whenever [options]"
|
|
opts.on('-c', '--write-crontab') { task = "whenever:write_cron" }
|
|
opts.on('-v', '--version') { puts "Whenever v#{Whenever::VERSION}"; exit }
|
|
end.parse!
|
|
|
|
Rake::Task[task].invoke |