-
Notifications
You must be signed in to change notification settings - Fork 11
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
Configuration of degree of parallelism #4
Comments
FYI, some of this is being handled in PR #21 |
I'm assuming I know the answer, but wanted to ask anyway. My .NET applications run load balanced on multiple servers. If I schedule a job to run every morning, but I only want it to run once, does NCronJob provide any mechanism to handle this? Or would this involve implementing some kind of external locking mechanism? |
In its current version you would have to implement the lock in the job (like redis) |
@ryanbuening this PR does not handle Mutex locking nor distributed locking. I recommend to take a look at the DistributedLock library for help with that. |
Very cool. Thanks! |
The options should allow a value that indicates how many jobs of a given type can run in parallel.
The configuration should be done via the registration of the job itself:
If there is a run and
MaximumConcurrentRuns
is reached, the upcoming run will be omitted.We could introduce another flag that indicates what should happen to the run:
So a registration could look like this:
Workaround
There is a current workaround, that a job itself can implement to achieve the same.
Here an example of a job that only allows one running instance at a time:
The text was updated successfully, but these errors were encountered: