commit
29f15a857c
1 changed files with 2 additions and 2 deletions
|
@ -3,13 +3,13 @@ namespace :jobs do
|
|||
task schedule: :environment do
|
||||
glob = Rails.root.join('app', 'jobs', '**', '*_job.rb')
|
||||
Dir.glob(glob).each { |f| require f }
|
||||
CronJob.subclasses.each(&:schedule)
|
||||
Cron::CronJob.subclasses.each(&:schedule)
|
||||
end
|
||||
|
||||
desc 'Display schedule for all cron jobs'
|
||||
task display_schedule: :environment do
|
||||
glob = Rails.root.join('app', 'jobs', '**', '*_job.rb')
|
||||
Dir.glob(glob).each { |f| require f }
|
||||
CronJob.subclasses.each(&:display_schedule)
|
||||
Cron::CronJob.subclasses.each(&:display_schedule)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue