# Use this file to easily define all of your cron jobs. # # It's helpful, but not entirely necessary to understand cron before proceeding. # http://en.wikipedia.org/wiki/Cron # Example: # # set :output, "/path/to/my/cron_log.log" # # every 2.hours do # command "/usr/bin/some_great_command" # runner "MyModel.some_method" # rake "some:great:rake:task" # end # # every 4.days do # runner "AnotherModel.prune_old_records" # end # Learn more: http://github.com/javan/whenever set :pwd, Dir.pwd unless :pwd set :environment, "production" unless :environment set :log_file, "#{pwd}/log/cron.log" env :MAILTO, "bgalura+co@gmail.com" every '30 * * * *' do command "cd #{pwd}; ./script/runner -e #{environment} 'notifiable { Cron.resend_support_requests }' >>#{log_file} 2>&1" command "cd #{pwd}; ./script/runner -e #{environment} 'notifiable { Cron.send_autoresponders }' >>#{log_file} 2>&1" end every 1.day, :at => '4:30 am' do rake "db2s3:backup:full RAILS_ENV=#{environment}" rake "db2s3:backup:full RAILS_ENV=blog" end every 4.days, :at => '4:30 am' do rake "db2s3:backup:clean RAILS_ENV=#{environment}" rake "db2s3:backup:clean RAILS_ENV=blog" end