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

limit maximum number of tasks in whenever gem rails #600

Closed
wonderer007 opened this issue Dec 22, 2015 · 1 comment
Closed

limit maximum number of tasks in whenever gem rails #600

wonderer007 opened this issue Dec 22, 2015 · 1 comment

Comments

@wonderer007
Copy link

How can i limit maximum number of tasks in whenever. For example if i have something like this

every 1.hours do
runner "MyModel.some_process"
rake "my:rake:task"
command "/usr/bin/my_great_command"
end

I want to limit it to 1 means if there is a thread already running do not start new thread at next hour.

@benlangfeld
Copy link
Collaborator

The general idea in #598 is what you're looking for. This is something that cron itself doesn't support, and I believe to be outside the scope of Whenever. You might want to consider using cron or sidekiq-scheduler to schedule jobs on a queue with a single worker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants