Skip to content

Adds tasks for Sidekiq Cron loading

License

Notifications You must be signed in to change notification settings

tenjin/sidekiq-cron-tasks

 
 

Repository files navigation

Sidekiq::Cron::Tasks

Build Status

Adds rake tasks for loading Sidekiq::Cron::Jobs from a config file.

Usage

Rake task

You can run the rake task via:

bundle exec rake sidekiq_cron:load

It expects a configuration file at config/sidekiq_cron.yml in this format:

default: &defaults
  rake task does stuff:
    cron: "42 0 * * *"
    class: "RakeTaskJob"
    args:
      - does:stuff

development:
  <<: *defaults

staging:
  <<: *defaults

production:
  <<: *defaults

You can configure the location of this file, as well as name prefixes for tasks:

Sidekiq::Cron::Tasks.configure do |config|
  config.file = "/custom/file/path"
  config.prefix = "notmyprefix"
end

Installation

Add this line to your application's Gemfile:

gem 'sidekiq-cron-tasks'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sidekiq-cron-tasks

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.

Packages

No packages published

Languages

  • Ruby 100.0%