Long running tasks
Long running tasks (LRT) in CzechIdM are available at the menu Settings → Task scheduler. LRT is a task which start is planned in advance and the instance runs at the background. Examples of LRT are identity lifecycle processes. The run of the LRT can be planned as one time run or periodically.
The first card of the form is Running tasks. It consists of the list of all currently running tasks. Progress bar of each running task is also available, if the LRT type supports it. Progress bar values are approximate and the total object count can change during LRT runs in some cases. In other words the LRT can start with progress 0/3598 which in a moment changes into na 0/1568 since there is some other change being done on the background of the aplication.
The next card Scheduled tasks shows the list of all available LRT. On the card one can create/delete tasks as well as plan the runs of the tasks or start the immediate run.
How to create a new LRT
When clicking on green button Add in the right upper corner we create a new LRT. On the popup window we choose the type of the task. In our example we choose the task that realize identity lifecycle process "end of user contract". We can also type the task description which will be then viewable at the list of all task. The last configurable option is instance, which defines the instance of CzechIdM that the task will run on. This choice has purpose only if the CzechIdM is installed in several instances. So in majority of cases the default value of idm-primary is the best choice. Then we save our new task by clicking on Save. Creating new LRT does not start the run instantly.
Planning LRT runs
In previous step we prepared new LRT, run of which we now want to plan. In our example we want that the LRT will run every day at 1:15 AM. To do so we click on the green button Add in the row with our previously created LRT and the column Planned runs. In next popup window, we can choose from these two options:
- One time run - By choosing the date via calendar we plan one run of the LRT
- Cron - Periodical runs. Syntax of this option follows the CRON syntax, if you are not familiar with the CRON syntax, click on the link Expression on the window. In our example we set the cron to a value of 0 15 1 * * ?
Every LRT can have several planned runs in the future. Planned run can be of course deleted. We can do that by clicking on the red cross sign next the planned run in the column Planned runs.
We can also start the LRT instantly. Use the green button with the sign of triable in the row with chosen LRT.