Tasks
Tasks enable asynchronous operations. They can be created either manually in the Web Admin Suite or automatically in a script. In both cases, the task is based on a script of the type Task which implements the logic of the operations to be performed. Tasks can be used for operations which are not related to specific user actions in the Web Client or CM/Track, e.g. general maintenance work. In addition, tasks allow to perform operations whose processing takes long, so that it would cause a timeout when executed as a regular script.
Tasks can permanently delete objects from the ConSol CM database. The actions performed by a task cannot be undone. Tasks performing bulk operations can have a severe impact on system performance.
Available settings for task execution
The following settings are available for task execution in general:
- Transaction timeout: The system property
cmas-core-server,transaction.timeout.minutesdetermines the transaction timeout for tasks. One run of a task must finish before this timeout is reached. If the operations to be performed by the task take longer, you need to split the processing and repeat the task, see Repeating a task. - Thread pool: The system property
cmas-core-server,number.of.tasksdetermines the size of the thread pool, i.e. how many tasks can be executed in parallel. - Time between executions: If the system property
cmas-core-server,task.execution.smart.intervalsis set to true, there is no idle time between the execution of two tasks. This can speed up task execution if you have lots of very small tasks. If you set the property to false, the time between to executions is determined by the system propertycmas-core-server,task.execution.interval.seconds. - Node ID (only relevant for clusters): The system property
cmas-core-server,task.execution.node.iddetermines on which cluster node the tasks are executed.
Basic tasks
You need to perform the following steps to use tasks in ConSol CM:
- Create a task script which implements the logic of the operations to be performed, see Creating a task script.
- Create a task which executes the task script, see Creating a task.
- You can track the task's progress in the task list, see Tracking the task execution.