Skip to content

Instantly share code, notes, and snippets.

@gabemcmillan
gabemcmillan / gist:6361137
Last active December 21, 2015 20:29
Code to check a message's created at time/date, see if its within a certain time window, and either send a reminder email or send a cancel email and cancel a Braintree Payments transaction. (gems used: whenever, usermailer, delayed job)
config/scheduler
set :output, "#{path}/log/cron.log"
case @environment
when 'development'
every :reboot do
command "script/delayed_job start"
rake "ts:index"
end