I have the following situation:
8 tasks scheduled to run with org.quartz.threadPool.threadCount
set to 5.
But in reality I can see that all 8 tasks are running.
How this could be possible?
If I set org.quartz.threadPool.threadCount=5
and I submitted 10 tasks for quartz, it is true that only 5 tasks will run in parallel?
What is the meaning of org.quartz.threadPool.threadCount
property?
I have such design:
org.quartz.threadPool.threadCount
set to 5.Thanks.
org.quartz.threadPool.threadCount Can be any positive integer, although you should realize that only numbers between 1 and 100 are very practical. This is the number of threads that are available for concurrent execution of jobs. If you only have a few jobs that fire a few times a day, then 1 thread is plenty!
Quartz scheduler allows an enterprise to schedule a job at a specified date and time. It allows us to perform the operations to schedule or unschedule the jobs. It provides operations to start or stop or pause the scheduler. It also provides reminder services.
It provides a fixed-size pool of threads that "live" the lifetime of the Scheduler. org.quartz.threadPool.threadCount. This specifies the number of threads that are available for concurrent execution of jobs. It can be set to a positive integer between 1 and 100.
Quartz is distributed as a small java library (. jar file) that contains all of the core Quartz functionality. The main interface (API) to this functionality is the Scheduler interface. It provides simple operations such as scheduling/unscheduling jobs, starting/stopping/pausing the scheduler.
It's true that QUARTZ's org.quartz.threadPool.threadCount is only the max number of concurrent/parallel execution.
That means that if you schedule X jobs greater than threadCount then K = X - threadCount jobs will wait at most a misFired milliseconds in some kind of queue for threadCount jobs to finish.
Thus Total number of scheduled jobs (or task) may be Number of waiting task in queue + Number of running task. With Number of running task less or equal to threadCount.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With