event_news/config/initializers/scheduler.rb

10 lines
251 B
Ruby
Raw Normal View History

2020-07-22 02:23:36 +00:00
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
2021-09-17 06:45:47 +00:00
system('bundle exec rake event_news:remove_preview_event_news')
2020-07-22 02:23:36 +00:00
end