Skip to content

Instantly share code, notes, and snippets.

@d6rkaiz
Created March 21, 2011 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d6rkaiz/880481 to your computer and use it in GitHub Desktop.
Save d6rkaiz/880481 to your computer and use it in GitHub Desktop.
set :cron, false
(ENV["SINSAI_TO"]||"").split(/,/).each do |e|
case e
when "cronsv"
role :app,"ec2-175-41-222-1.ap-northeast-1.compute.amazonaws.com"
set :cron, true
end
end
before 'deploy:cronsetup' do
if :cron
upload("files/kmlcron.sh", "/tmp/", :via => :scp)
try_sudo "crontab < /tmp/kmlcron.sh"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment