Bruno Fernandes
Bruno Fernandes

Reputation: 145

How to set up a Sidekiq Job to run every ten minutes until 23:59

I have this job set up in sidekiq to run every 10 minutes every day.

The problem is that I need it to run at 23:59 instead of running at 00:00. Is it possible to specify this exception in cron?

monitored_place_worker:
  cron: '*/10 * * * *'
  class: 'MonitoredPlacePoolWorker'
  queue: default
  active_job: true

Upvotes: 0

Views: 1427

Answers (1)

NilColor
NilColor

Reputation: 3542

You can add two scheduler rules. One - almost the same as yours: cron: '*/10 0-23 * * *' but for hours 0 through 23.

And the second rules for past 23th hour like this cron: 0,10,20,30,40,50,59 23 * * *

Upvotes: 1

Related Questions