ThreadPool Configuration
Property Name | Required | Type | Default Value |
org.quartz.threadPool.class | yes | string (class name) | null |
org.quartz.threadPool.threadCount | yes | int | -1 |
org.quartz.threadPool.threadPriority | no | int | Thread.NORM_PRIORITY (5) |
org.quartz.threadPool.class
The name of the ThreadPool implementation to use. The ThreadPool that ships with Quartz is org.quartz.simpl.SimpleThreadPool, and should meet the needs of nearly every user. It has a simple behavior and is well tested. It provides a fixed-size pool of threads that 'live' the lifetime of the scheduler.
org.quartz.threadPool.threadCount
The number of threads available for concurrent execution of jobs. You can specify any positive integer, although only numbers between 1 and 100 are practical. If you only have a few jobs that fire a few times a day, then one thread is plenty. If you have tens of thousands of jobs, with many firing every minute, then you want a thread count more like 50 or 100 (this highly depends on the nature of the work that your jobs perform, and your systems resources).
org.quartz.threadPool.threadPriority
Can be any int between Thread.MIN_PRIORITY (which is 1) and Thread.MAX_PRIORITY (which is 10). The default is Thread.NORM_PRIORITY (5).
SimpleThreadPool-Specific Properties
Property Name | Required | Type | Default Value |
org.quartz.threadPool.makeThreadsDaemons | no | boolean | false |
org.quartz.threadPool. threadsInheritGroupOfInitializingThread | no | boolean | true |
org.quartz.threadPool. threadsInheritContextClassLoaderOfInitializing Thread | no | boolean | false |
org.quartz.threadPool.threadNamePrefix | no | string | [Scheduler Name]_Worker |
org.quartz.threadPool.makeThreadsDaemons
Set to true to have the threads in the pool created as daemon threads. Default is false. See also the
org.quartz.scheduler.makeSchedulerThreadDaemon property in
Main Scheduler Configuration Settings.
org.quartz.threadPool.threadsInheritGroupOfInitializingThread
Can be true or false. Defaults to true.
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread
Can be true or false. Defaults to false.
org.quartz.threadPool.threadNamePrefix
The prefix for thread names in the worker pool. It will be postpended with a number.
Custom ThreadPools
If you use your own implementation of a thread pool, you can have properties set on it reflectively by naming the property as shown here:
org.quartz.threadPool.class = com.mycompany.goo.FooThreadPool
org.quartz.threadPool.somePropOfFooThreadPool = someValue