Skip to content

Commit

Permalink
Merge pull request #791 from ttilberg/patch-2
Browse files Browse the repository at this point in the history
Clarify options and warn about overwriting
  • Loading branch information
benlangfeld committed Apr 24, 2020
2 parents b205bcd + 8805cb1 commit e916b58
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions bin/whenever
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ options = {}

OptionParser.new do |opts|
opts.banner = "Usage: whenever [options]"
opts.on('-i', '--update-crontab [identifier]', 'Default: full path to schedule.rb file') do |identifier|
opts.on('-i', '--update-crontab [schedule]',
'Install the schedule to crontab.',
' Default: full path to schedule.rb file') do |identifier|
options[:update] = true
options[:identifier] = identifier if identifier
end
opts.on('-w', '--write-crontab [identifier]', 'Default: full path to schedule.rb file') do |identifier|
opts.on('-w', '--write-crontab [schedule]',
'Clear current crontab, and overwrite it with only the given schedule.',
' Default: full path to schedule.rb file') do |identifier|
options[:write] = true
options[:identifier] = identifier if identifier
end
opts.on('-c', '--clear-crontab [identifier]') do |identifier|
opts.on('-c', '--clear-crontab [schedule]',
'Uninstall the schedule from crontab.',
' Default: full path to schedule.rb file') do |identifier|
options[:clear] = true
options[:identifier] = identifier if identifier
end
Expand Down

0 comments on commit e916b58

Please sign in to comment.