No commit activity in last 3 years
No release in over 3 years
Schedule Cron style Sidekiq jobs
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.0
~> 0.8

Runtime

>= 3.0
 Project Readme

Build Status Gem Version

Sidekiq Schedulable

Schedule Cron style Sidekiq jobs

Usage

require 'sidekiq_schedulable'
class MyJob
  include Sidekiq::Worker
  include Sidekiq::Schedulable

  sidekiq_options retry: false, queue: 'my_scheduled_jobs_queue'
  sidekiq_schedule '*/5 * * * * *'

  def perform
    RunReport.call
  end
end

Using the last run time:

class MyJob
  include Sidekiq::Worker
  include Sidekiq::Schedulable

  sidekiq_options retry: false, queue: 'my_scheduled_jobs_queue'
  sidekiq_schedule '*/5 * * * * *', last_run: true

  def perform(last_run)
    RunReport.between(Time.at(last_run), Time.now)
  end
end