Usage
Ruby on Rails
.schked
:
--require config/environment.rb
config/schedule.rb
:
cron "*/30 * * * *", as: "CleanOrphanAttachmentsJob" do
CleanOrphanAttachmentsJob.perform_later
end
If you have a Rails engine with own schedule:
engine-path/lib/foo/engine.rb
:
module Foo
class Engine < ::Rails::Engine
initializer "foo" do |app|
Schked.config.paths << root.join("config", "schedule.rb")
end
end
end
And run Schked:
bundle exec schked start
To show schedule:
bundle exec schked show