Skip to content

Instantly share code, notes, and snippets.

Created December 19, 2012 20:57
What would you like to do?
Jinglebots cronjob
#! /bin/bash
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
# this line kills the existing speak.rb if one is running
for X in `ps aux | grep speak.rb $1 | awk {'print $2'}`; do kill $X; done
# need to cd to the proper directory for relative path reasons in the ruby code
cd ~/Desktop/jinglebots/robot
ruby speak.rb
# Assign needed environment variables here
# REDIS_URI=redis://
*/30 * * * * ~/Desktop/cronjobs/bash_script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment