Created
June 20, 2011 11:16
-
-
Save gerardc/1035453 to your computer and use it in GitHub Desktop.
Example cron job calling rake from within a rails application running on an RVM ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*/5 * * * * /usr/local/rvm/bin/rvm-shell 'ruby-1.9.2-p180' -c 'BUNDLE_GEMFILE=$HOME/www/rails_apps/<APP_NAME>/current/Gemfile RAILS_ENV=production bundle exec rake -f $HOME/www/rails_apps/<APP_NAME>/current/Rakefile <TASK_NAME>' > $HOME/www/rails_apps/<APP_NAME>/current/log/<TASK_NAME>_output.log 2>$HOME/www/rails_apps/<APP_NAME>/current/log/<TASK_NAME>_error.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment