How to add a scheduled Resque job in ruby on rails?

285 Views Asked by At

Recently I have shifted from 'Sidekiq' to 'Resque' gem in my application. I want to shift the scheduled jobs also. But I am unaware of how to do that.

Code with Sidekiq (Before) -

class SetCurrentDay
    include Sidekiq::Worker
    include Sidetiq::Schedulable

    recurrence { daily.hour_of_day(0).minute_of_hour(0) }
end

Code with Resque (After) -

class SetCurrentBugDay
    require 'resque/server'

    recurrence { daily.hour_of_day(0).minute_of_hour(0) }
end

Does anyone know how to do this? Please help!

1

There are 1 best solutions below