Run tasks only on weekdays #33

Open
opened 2025-12-29 00:21:37 +01:00 by adam · 1 comment
Owner

Originally created by @zanloy on GitHub (Apr 11, 2016).

Maybe I am missing something but is there a way to run a task only on weekdays? Or some way to exclude Saturday and Sunday at least?

Originally created by @zanloy on GitHub (Apr 11, 2016). Maybe I am missing something but is there a way to run a task only on weekdays? Or some way to exclude Saturday and Sunday at least?
adam added the enhancement label 2025-12-29 00:21:37 +01:00
Author
Owner

@plashchynski commented on GitHub (Jun 24, 2016):

Hello @zanloy
Sorry, there's no way for now, as a temporary solution you can set different jobs for each weekday:

[:monday, :tuesday, :wednesday, :thursday, :friday].each do |week_day|
  Crono.perform(TestJob).every 1.week, on: week_day
end
@plashchynski commented on GitHub (Jun 24, 2016): Hello @zanloy Sorry, there's no way for now, as a temporary solution you can set different jobs for each weekday: ``` [:monday, :tuesday, :wednesday, :thursday, :friday].each do |week_day| Crono.perform(TestJob).every 1.week, on: week_day end ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/crono#33