Created
October 16, 2010 03:53
-
-
Save thekindofme/629388 to your computer and use it in GitHub Desktop.
bash script that is run by cron
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
source "/home/foobar/.rvm/scripts/rvm" | |
if [ $1 == 'task1' ]; then | |
/usr/bin/env /home/foobar/.rvm/rubies/ruby-1.9.2-p0/bin/ruby /var/www/rails_app/script/rails runner -e production "Tasker.task1" | |
exit 1; | |
fi | |
if [ $1 == 'task2' ]; then | |
/usr/bin/env /home/foobar/.rvm/rubies/ruby-1.9.2-p0/bin/ruby /var/www/rails_app/script/rails runner -e production "Tasker.task2" | |
exit 1; | |
fi | |
if [ $1 == 'task3' ]; then /usr/bin/env /home/foobar/.rvm/rubies/ruby-1.9.2-p0/bin/ruby /var/www/rails_app/script/rails runner -e production "Tasker.task3" | |
exit 1; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment