Skip to content

Instantly share code, notes, and snippets.

@nati
Created March 21, 2011 23:25
Show Gist options
  • Select an option

  • Save nati/880463 to your computer and use it in GitHub Desktop.

Select an option

Save nati/880463 to your computer and use it in GitHub Desktop.
role :cron,"ec2-175-41-222-1.ap-northeast-1.compute.amazonaws.com"
namespace :deploy do
#deploy:restartタスク
task :restart, :roles => :app do
send(:run, "sudo /etc/init.d/apache2 restart")
end
#deploy:startタスク
task :start, :roles => :app do
send(run_method, "sudo /etc/init.d/apache2 restart")
end
task :cronsetup, :roles => :cron do
cronsv向けのコマンド
end
end
とすれば
cap deploy:cronsetup で動くようになるはず
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment