Skip to content

Commit 8805cb1

Browse files
authored
Clarify options and warn about overwriting
This might help new users select the desired operation, and make it known that some operations are potentially dangerous. - Change `[identifier]` to `[schedule]` - Add note about overwriting existing crontab
1 parent b205bcd commit 8805cb1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

bin/whenever

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@ options = {}
88

99
OptionParser.new do |opts|
1010
opts.banner = "Usage: whenever [options]"
11-
opts.on('-i', '--update-crontab [identifier]', 'Default: full path to schedule.rb file') do |identifier|
11+
opts.on('-i', '--update-crontab [schedule]',
12+
'Install the schedule to crontab.',
13+
' Default: full path to schedule.rb file') do |identifier|
1214
options[:update] = true
1315
options[:identifier] = identifier if identifier
1416
end
15-
opts.on('-w', '--write-crontab [identifier]', 'Default: full path to schedule.rb file') do |identifier|
17+
opts.on('-w', '--write-crontab [schedule]',
18+
'Clear current crontab, and overwrite it with only the given schedule.',
19+
' Default: full path to schedule.rb file') do |identifier|
1620
options[:write] = true
1721
options[:identifier] = identifier if identifier
1822
end
19-
opts.on('-c', '--clear-crontab [identifier]') do |identifier|
23+
opts.on('-c', '--clear-crontab [schedule]',
24+
'Uninstall the schedule from crontab.',
25+
' Default: full path to schedule.rb file') do |identifier|
2026
options[:clear] = true
2127
options[:identifier] = identifier if identifier
2228
end

0 commit comments

Comments
 (0)