I have jobs class for ex
class TempJob < ActiveJob::Base
queue_as :default # To Do Design Queue
around_perform do |job, block|
puts "Before Perform'
block.call
puts "After Perform"
end
def perform(*args)
puts "Job Start"
end
end
I am trying to schedule job to be execute 1hours from now
TempJob.perform_at(1.hour.from_now)
but it is giving me following error
NoMethodError: undefined method `perform_at' for TempJob:Class
Using Rails 4.2.0, Ruby 2.2.0, and Sidekiq 3.4.2.