I have a hopefully a simple question to which i can't find the answer.
If i schedule a Job of type LongRunningAndHeavyJob
on demand (StartNow())
i dont know how long this job will run but it can be long (from 10 minutes to 60+ minutes) and is very CPU intensive. Because the end-users can start this job on demand i want to make sure only one instance of this job is running at a certain time.
So for example:
- John click on button schedule at 14:00:00
- Quartz.net server will run this job
- Jane clicks on the button schedule at 14:05:00 but the job of John is still running
How can i make sure that the job of Jane will not run at the same time with the job of John and will run after the job of John is finished.
The attribute DisallowConcurrentExecution
is only for use if you have a job that is schedule with a trigger that is repeating i think and the job need to have the same key which i don't have.
Some extra info: Job of John has different JobData than the job of Jane
Thanks in advance