Skip to content

Instantly share code, notes, and snippets.

@thekindofme
Created October 16, 2010 03:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thekindofme/629388 to your computer and use it in GitHub Desktop.
Save thekindofme/629388 to your computer and use it in GitHub Desktop.
bash script that is run by cron
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