Sha256: b15c56fafb272fc2f601ca163af2b1518bf4edd82ddbb3529a5c2a9c4a7e9066

Contents?: true

Size: 644 Bytes

Versions: 13

Compression:

Stored size: 644 Bytes

Contents

Capistrano::Configuration.instance.load do
  require_settings :application, :env, :current_path

  after "deploy:update_code", "cron:update"
  after "stop", "cron:clear"

  namespace :cron do
    desc "Update the crontab"
    task :update, roles: :db, on_no_matching_servers: :continue do
      run "cd #{current_path}; bundle exec whenever --update-crontab #{application}_#{env} --set environment=#{env}"
    end

    desc "Clear the crontab"
    task :clear, roles: :db, on_no_matching_servers: :continue do
      run "cd #{current_path}; bundle exec whenever --clear-crontab #{application}_#{env} --set environment=#{env}"
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
capistrano-elobuff-0.2.7 lib/capistrano/elobuff/recipes/cron.rb
capistrano-elobuff-0.2.6 lib/capistrano/elobuff/recipes/cron.rb
capistrano-elobuff-0.2.5 lib/capistrano/elobuff/recipes/cron.rb
capistrano-elobuff-0.2.4 lib/capistrano/elobuff/recipes/cron.rb
capistrano-elobuff-0.2.3 lib/capistrano/elobuff/recipes/cron.rb
capistrano-elobuff-0.2.2 lib/capistrano/elobuff/recipes/cron.rb
capistrano-elobuff-0.2.1 lib/capistrano/elobuff/recipes/cron.rb
capistrano-elobuff-0.2.0 lib/capistrano/elobuff/recipes/cron.rb
capistrano-elobuff-0.1.4 lib/capistrano/elobuff/recipes/cron.rb
capistrano-elobuff-0.1.3 lib/capistrano/elobuff/recipes/cron.rb
capistrano-elobuff-0.1.2 lib/capistrano/elobuff/recipes/cron.rb
capistrano-elobuff-0.1.1 lib/capistrano/elobuff/recipes/cron.rb
capistrano-elobuff-0.1.0 lib/capistrano/elobuff/recipes/cron.rb