Skip to content

Instantly share code, notes, and snippets.

@sepastian
Created March 17, 2015 09:02
Show Gist options
  • Save sepastian/b9372cf661be41da668a to your computer and use it in GitHub Desktop.
Save sepastian/b9372cf661be41da668a to your computer and use it in GitHub Desktop.
rbenv and cron
# Run a Ruby script every minute.
# Use the Ruby provided by rbenv.
#
# Edit with crontab -e.
*/1 * * * * /bin/bash -c 'export PATH=$HOME/.rbenv/shims:$HOME/.rbenv/bin:"$PATH"; eval "$(rbenv init -)"; cd $HOME/path/to/script/; ruby ./graph.rb > /output/path/index.html'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment