Skip to content

Instantly share code, notes, and snippets.

@kazuph kazuph/.bash_profile
Last active Feb 2, 2017

Embed
What would you like to do?
cronからbundle exec...はsu - <USER> -lc ...が一番便利 ref: http://qiita.com/kazuph/items/c530359eada5b2639e68
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH=$HOME/local/ruby-2.1/bin:$PATH
0 */1 * * * root su - <USER_NAME> -lc "cd /home/<USER_NAME>/yourproject_path && bundle exec ruby hoge.rb" >> /var/log/yourproject/cron/hoge.log 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.