Skip to content

Instantly share code, notes, and snippets.

@efatsi
Created December 19, 2012 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save efatsi/4340349 to your computer and use it in GitHub Desktop.
Save efatsi/4340349 to your computer and use it in GitHub Desktop.
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://the_really_long_redis_uri@redistogo.com:/1234/
*/30 * * * * ~/Desktop/cronjobs/bash_script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment