Skip to content
This repository
tree: f4d94dd514
Fetching contributors…

Cannot retrieve contributors at this time

file 75 lines (61 sloc) 1.61 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
# 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 :cron_log, "/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 your path in cron before the whenever section and use --update-crontab
set :set_path_automatically, false

set :cron_log, "#{path}/log/whenever.log"

# put a timestamp in the whenever log
every 1.days, :at => 'midnight' do
  command "date"
end

# Purge user accounts that haven't been activated
every 1.days, :at => '6:31 am' do
  rake "admin:purge_unvalidated_users"
end

# Unsuspend selected users
every 1.day, :at => '6:51 am' do
  rake "admin:unsuspend_users"
end

# Delete unused tags
every 1.day, :at => '7:10 am' do
  rake "Tag:delete_unused"
end

# Delete old drafts
every 1.day, :at => '7:40 am' do
  rake "work:purge_old_drafts"
end

# Send kudos notifications
every 1.day, :at => '6:10am' do
  rake "notifications:deliver_kudos"
end

# Send subscription notifications
every 1.hour do
  rake "notifications:deliver_subscriptions"
end

# Move hit counts from redis to database
every 10.minutes do
  rake "statistics:update_hit_counters"
end

# Move readings from redis to database
every 10.minutes do
  rake "readings:to_database"
end

# Rerun redis jobs
every 10.minutes do
  rake "resque:run_failures"
end
Something went wrong with that request. Please try again.