Skip to content

Instantly share code, notes, and snippets.

@fguillen
Created August 9, 2011 09:05
Show Gist options
  • Save fguillen/1133641 to your computer and use it in GitHub Desktop.
Save fguillen/1133641 to your computer and use it in GitHub Desktop.
Cron & RVM & Bundle & Rails & Rake & log
00 01 * * * /bin/bash --login -c 'cd <your app> && RAILS_ENV=production /usr/bin/env bundle exec rake <your rake>' >> /var/log/<your app>.log 2>&1
@subimage
Copy link

Bundle and cron were giving me issues before this. Loading the environment through bash -c worked. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment