Skip to content

Instantly share code, notes, and snippets.

@todgru
Created May 27, 2015 15:49
Show Gist options
  • Save todgru/c85820cdd5cf20de8baf to your computer and use it in GitHub Desktop.
Save todgru/c85820cdd5cf20de8baf to your computer and use it in GitHub Desktop.
Running rake file dependand on environment variables
# having env.sh in /etc/profile.d allows access to all users...be careful
*/5 * * * * . /etc/profile.d/env.sh && cd /opt/path && /home/ubuntu/.rbenv/shims/bundle exec rake task
# export all the var in this file
export SPECIAL_VAR=123456789
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment