event_ann/config/initializers/scheduler.rb

10 lines
245 B
Ruby

require 'rufus-scheduler'
scheduler = Rufus::Scheduler.new
#return if defined?(Rails::Console) || Rails.env.test? || File.split($0).last == 'rake'
scheduler.cron '43 2 * * *' do
system('bundle exec rake event:remove_preview_bulletins')
end