Adds rake
tasks for loading Sidekiq::Cron::Job
s from a config
file.
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
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
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.