Reputation: 1178
I'm using sidekiq-scheduler and have the need to configure the follow schedule to run a worker:
Run each minute from 9h to 18h, but don't run at weekends
It's possible to do something like this with this scheduler?
Upvotes: 1
Views: 149
Reputation: 2624
Yes, It's possible: * 9-18 * * 1-5
.
Monday
is 1
, Tuesday
is 2
, and so on.
In order not to run at weekends, we'll run from Monday to Friday (1-5)
.
# config/sidekiq.yml
:schedule:
hello_world:
cron: '* 9-18 * * 1-5' # Run each minute from 9h to 18h from Monday to Sunday
class: HelloWorld
Upvotes: 2