Task Scheduler Settings
- Last UpdatedJun 06, 2024
- 3 minute read
Task Scheduler Services
This service handles the execution of all tasks that have not taken place as scheduled (escalations).
Task Scheduler does not persist any information in memory. All tasks are database persisted and are performed only when due time is reached.
The Task Scheduler use a queue to process the tasks in parallel. Due to queuing up of Task, you may not get accurate timeouts with seconds accuracy.
Example of the service behavior
Consider that there are 25 threads running for processing the tasks. The polling on Database occurs at 11:00 AM which fetches 30 tasks which are due to perform by 11:45. Since all of them has to be performed at 11:45, all the 25 threads go to sleep stage for 45 Seconds for the first 25 tasks and the rest of the 5 tasks get queued up as there are no threads to process the tasks. At 11:45, tasks get performed freeing up the threads. The 5 tasks which were queued get processed now. As you can see the accuracy of 11:45 is already.
Compromised for the 5 tasks as they might perform at 11:46 or 11:47 or 11:48. To set the Task Pool limit and Thread Pool size, see Task Scheduler Settings section later in this topic.
Load Test Behavior of Task Scheduler
The Task Scheduler is tested along with the load test that is normally done for the engine and cannot be tested separately. The test is regarding how much load the Task Scheduler can handle. The test for the engine varies from 1000 to 20,000 instances or more. During this load the task scheduler will be loaded with more than 10,000 tasks which might perform at the same time or at a different time. If all the tasks are due for a specific time there will be a delay for the task perform time.
If there are 10,000 tasks to be executed at the same time, definitely the memory usage will be high as all the tasks will be queued and will get executed in parallel.
For example, assume that the due time is December 11th, 12:30 P.M., on heavy load, if there are many tasks which have to be executed at the same time, some of the tasks will get performed by 12:35 or 12:40. This delay time is mainly due to the threads which are available in the Task Scheduler.
Task Scheduler uses threads for executing the tasks, so on heavy load, threads get queued up and wait for one task to be performed and then the next one. By default parallel there could be 25 tasks which will get executed at the same time, still on heavy load there will be a delay.
Task Scheduler pools the database every one minute to check the tasks which are due. For example, at December 12th 10:18 AM all tasks which are new and due by 10:18 AM will be picked and performed.
Task Scheduler Settings
The Task Scheduler Settings screen is used to customize settings for the various AVEVA Work Tasks tasks.
The following table provides information on the various fields and the default values for specific fields:
|
Field Name |
Default Value |
Description |
|---|---|---|
|
Server Port |
8856 |
This field denotes the port number used by Task Scheduler service. This value must be modified if the default port value is in use. |
|
Load Balanced |
False |
This field is used to set load balancing for AVEVA Work Tasks. This field is enabled only for the Load Balanced Server installation. To enable load balancing set the Load Balanced value to true. |
|
Load Balanced Server Port |
8853 |
This field allows you to enter the port number for the Load Balanced Server. This field is disabled if Load Balanced is set to False. |
|
Load Balanced Client Port |
8860 |
This field is used to enter the port number for the Load Balanced Client. |
|
Task Fetch Interval |
60 |
This field is used to specify the interval in seconds at which tasks have to be retrieved. |
|
File Watcher |
This field is used to define a folder for File Watcher operation. |
|
|
Thread Pool Size |
25 |
This field allows you to define a thread pool size for the Workflow Engine. A thread pool size determines the number of threads reserved by a server for providing service requests. For a Workflow Engine deployed in a heavy load scenario, a higher thread pool size needs to be set. |
Steps to apply Task Scheduler settings
-
Click OK to apply these settings.