0

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!

User
  • 169
  • 1
  • 11

1 Answers1

1

https://medium.com/@pawlkris/scheduling-tasks-in-rails-with-cron-and-using-the-whenever-gem-34aa68b992e3

https://dev.to/risafj/cron-jobs-in-rails-a-simple-guide-to-actually-using-the-whenever-gem-now-with-tasks-2omi

I think it will help you to schedule "Cron jobs in Rails"

  • Thanks for the suggestion but these links are for the gem 'Whenever'. – User Jul 15 '22 at 06:06
  • yes, it's commonly used gem for scheduling, at a time same thing i am learning, you can use 'Sidekiq' to 'Resque' but cron job is quite different like it not depend on you or your actions it will perform his task in given time or time frame or.. – Divyarajsinh Jul 15 '22 at 06:31