custom_announcement/config/initializers/scheduler.rb

10 lines
262 B
Ruby
Raw Normal View History

2021-06-17 10:52:39 +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
system('bundle exec rake custom_bulletin:remove_preview_custom_bulletins')
end