Sha256: af1d4eef934e69809ed3d67b96bff1c3022ebb7e93017ae9a579eb4e2ad45d3c
Contents?: true
Size: 973 Bytes
Versions: 2
Compression:
Stored size: 973 Bytes
Contents
set(:whenever_command) { "#{fetch(:bundle_cmd)} exec whenever" } set(:whenever_variables) {"\"environment=#{rails_env}&path=#{current_path}&output=#{shared_path}/log/crontab.log\"" } set(:whenever_roles) { :crontab } require "whenever/capistrano/recipes" namespace :crontab do desc "Generate crontab from config/whenever.rb" task :generate, :roles => :crontab, :on_no_matching_servers => :continue, :except => { :no_release => true } do if find_servers_for_task(current_task).any? CapistranoRailsRecipes::Util.ensure_changed_remote_files(self, "config/schedule.rb") do find_and_execute_task("whenever:update_crontab") end end end desc "Clear crontab" task :clear, :roles => :crontab, :on_no_matching_servers => :continue, :except => { :no_release => true } do if find_servers_for_task(current_task).any? find_and_execute_task("whenever:clear_crontab") end end end after "deploy:restart", 'crontab:generate'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
capistrano_rails_recipes-0.1.23 | lib/capistrano_rails_recipes/recipes/crontab.rb |
capistrano_rails_recipes-0.1.22 | lib/capistrano_rails_recipes/recipes/crontab.rb |