Skip to content

option to clear all releases from crontab #613

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

altherlex
Copy link

reset crontab file
You need it when you have many releases (like OpsWorks) but it necessary reset the cron.

@benlangfeld benlangfeld modified the milestone: 0.10.0 Jun 12, 2016
system "crontab -l | sed 's/>/>>/' | crontab - "
# Remove crontab
system "crontab -r"
# Reinitilize
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reinitilize => Reinitialize

@@ -1,3 +1,3 @@
module Whenever
VERSION = '0.9.4'
VERSION = '0.9.5'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't bump version in a PR to add something. The bumping of the version is a part of the release process.

@@ -18,7 +18,7 @@ def initialize(options={})
exit(1)
end

if [@options[:update], @options[:write], @options[:clear]].compact.length > 1
if [@options[:update], @options[:write], @options[:clear], options[:clear_all]].compact.length > 1
warn("[fail] Can only update, write or clear. Choose one.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include "clear_all" in this warn message.

bin/whenever Outdated
@@ -20,6 +20,9 @@ OptionParser.new do |opts|
options[:clear] = true
options[:identifier] = identifier if identifier
end
opts.on('-a', '--clear-all-flags-crontab') do |identifier|
Copy link
Contributor

@olleolleolle olleolleolle Dec 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opts.on takes a third argument which is the user-visible documentation string for this option. Include one here.

We don't use the block argument, so I think you should remove it from this block.

@swordfish444
Copy link

@altherlex Have you had a chance to revisit this PR? I'd like to see it get merged as we are also running into issues with leftover crons when switching environments.

@pedrofurtado
Copy link

pedrofurtado commented Jun 15, 2018

@javan @olleolleolle @benlangfeld Any news about this PR? That's a great feature.

@Matt-Yorkley
Copy link

+100

This clear-all option is desperately needed!

Base automatically changed from master to main January 20, 2021 18:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants