1

Using sidekiq-scheduler, how can we schedule a worker to run 2nd of every month on a specified time?

import_worker:
  every: '0 0 * 1 *'
  class: ImportWorker
  queue: scheduler
  enabled: true

Will the above cron run every one month? Also how can I specify time here?

Suganya Selvarajan
  • 962
  • 1
  • 11
  • 33

1 Answers1

1

You want cron, not every. cron format is minute, hour, day of month, month, day of week. 0 0 * 1 * says to run every day of January at midnight. To run on the 2nd of every month at 12:30 would be 30 12 2 * *.

import_worker:
  cron: '30 12 2 * *'
  class: ImportWorker
  queue: scheduler
Schwern
  • 153,029
  • 25
  • 195
  • 336