Skip to content

Instantly share code, notes, and snippets.

@dangalipo
Created March 22, 2013 03:40
Show Gist options
  • Save dangalipo/5218785 to your computer and use it in GitHub Desktop.
Save dangalipo/5218785 to your computer and use it in GitHub Desktop.
#! /bin/bash
# This script is meant to be run daily and will process all of the subscriptions
# and payments
RAILSENV=$1
if [RAILSENV eq 'staging']
then
cd /var/vhosts/take5feedback.tfgrails.com/current
else
cd /var/vhosts/take5feedback.com/current
fi
RAILS_ENV=RAILSENV /usr/local/rvm/bin/rvm tfg@take5-feedback exec bundle exec rake subscriptions:deactivate_expired_free_trial_subscriptions
RAILS_ENV=RAILSENV /usr/local/rvm/bin/rvm tfg@take5-feedback exec bundle exec rake subscriptions:deactivate_expired_free_trials
RAILS_ENV=RAILSENV /usr/local/rvm/bin/rvm tfg@take5-feedback exec bundle exec rake subscriptions:process_subscription_payments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment