class ScheduledJob::Job

Public Instance Methods

install_tasks() click to toggle source
# 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