Features of Distributing Task Threads

On working with a large number of tasks, the task scheduler distributes the number of threads (selected in the file containing task scheduler settings) in equal shares between task classes, for example, when there are three classes and eight threads, two threads are assigned to each class, other threads are not used. Normally, there are some tasks that do not require much resources and are executed repeatedly in certain intervals; these tasks must be executed first without delay, and a number of resource-intensive tasks with various priority.

An individual queue is formed for each task class in the task scheduler. At least one thread should always be assigned for each task class to avoid situations, when a task of certain class cannot be started as all threads are reserved by other classes.

An individual queue can be created for repeated tasks on setting the IScheduledTaskProperties.Queueing property to True. When tasks are executed, first the server checks whether the task itself has a queue, and then whether there is a queue caused by exceeding the maximum number of simultaneously running tasks.

To limit the number of simultaneously running tasks in the task scheduler, use the ThreadsCount attribute in the <Metabases> section of configuration file.

See also:

Configuration File