Class: ScheduledJob::Job
- Inherits:
-
Object
- Object
- ScheduledJob::Job
- Includes:
- Rake::DSL
- Defined in:
- lib/tasks/jobs.rb
Instance Method Summary collapse
Instance Method Details
#install_tasks ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/tasks/jobs.rb', line 7 def install_tasks namespace:jobs do desc "Will schedule all scheduled jobs" task :reschedule => :environment do if ActiveRecord::Base.connection.table_exists?('delayed_jobs') ScheduledJob.reschedule else puts "Skipping this rake task as the delayed_jobs table doesn't exist yet." end end end end |