Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 21 lines (18 sloc) 594 Bytes
#!/usr/bin/env ruby
require File.join(File.dirname(__FILE__), '..', 'config', 'environment')
require 'net/imap'
require 'net/http'
require 'rubygems'
require 'logger'
log = Logger.new(STDOUT)
unless ARGV.empty?
# create the report and email it
success = Donation.create_donation_report(ARGV)
if success
log.info Time.now.to_s + " Done and going to sleep..."
else
log.info "Oops, you have to run the script with unsupported characters. Please check the command and try again."
end
else
log.info "Oops, you need to provide the interval you wish to create a report for."
end