Skip to content

Instantly share code, notes, and snippets.

@itsderek23
Forked from andre/scout_cron.sh
Created April 16, 2013 18:33
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 itsderek23/5398360 to your computer and use it in GitHub Desktop.
Save itsderek23/5398360 to your computer and use it in GitHub Desktop.
#! /usr/bin/env bash
# This example bash script file is located here: /home/your-username/scripts/scout_cron.sh for our example, but could be anywhere on your server.
# Make sure you remember to make this file an executable script by: chmod +x /home/your-username/scripts/scout_cron.sh.
# Loading the RVM Environment files. To find your unique rvm path use: rvm env --path -- ruby-version[@gemset-name].
# For example: rvm env --path -- 1.9.3-p194@projectX
source /home/deploy/.rvm/environments/ruby-1.9.3-p374
# Changing directories to our rails project. The example below is a Capistrano path.
cd /u/apps/zed/current
# Call Scout and pass your unique key you were given.
bundle exec scout KEY
# Below is an example of using this script from cron every minute.
# Type crontab -e to edit your user's cron file and add the following two lines at the bottom.
# MAILTO=""
# * * * * * /home/your-username/scripts/scout_cron.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment