Class: CheckAndNotify::Cron
- Inherits:
-
Object
- Object
- CheckAndNotify::Cron
- Defined in:
- lib/check_and_notify/cron.rb
Class Method Summary collapse
- .init ⇒ Object
- .init_every_hour_cron ⇒ Object
- .init_every_ten_minutes_cron ⇒ Object
- .init_every_thirty_minutes_cron ⇒ Object
Class Method Details
.init ⇒ Object
3 4 5 6 |
# File 'lib/check_and_notify/cron.rb', line 3 def self.init init_every_hour_cron init_every_ten_minutes_cron end |
.init_every_hour_cron ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/check_and_notify/cron.rb', line 10 def self.init_every_hour_cron Sidekiq::Cron::Job.create({ name: 'CheckEveryHourWorker', cron: '0 * * * *', class: 'CheckAndNotify::Workers::CheckEveryHourWorker' }) end |
.init_every_ten_minutes_cron ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/check_and_notify/cron.rb', line 18 def self.init_every_ten_minutes_cron Sidekiq::Cron::Job.create({ name: 'CheckEveryTenMinutesWorker', cron: '*/10 * * * *', class: 'CheckAndNotify::Workers::CheckEveryTenMinutesWorker' }) end |
.init_every_thirty_minutes_cron ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/check_and_notify/cron.rb', line 26 def self.init_every_thirty_minutes_cron Sidekiq::Cron::Job.create({ name: 'CheckEveryThirtyMinutesWorker', cron: '*/30 * * * *', class: 'CheckAndNotify::Workers::CheckEveryThirtyMinutesWorker' }) end |