Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tasks only on weekdays #46

Open
zanloy opened this issue Apr 11, 2016 · 1 comment
Open

Run tasks only on weekdays #46

zanloy opened this issue Apr 11, 2016 · 1 comment

Comments

@zanloy
Copy link

zanloy commented 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?

@plashchynski
Copy link
Owner

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants