7.6:dev:configuration:scheduled_tasks

To be merged into TUTORIAL

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.

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.

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 three options:

  • One time run - By choosing the date via calendar we plan one run of the LRT. If the time was entered in the past, then the task is launched right away.
  • 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 * * ?
  • Dependent task - By choosing the other task - when other task successfully ends, then this task will run.

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.

On card All tasks there is a list of all runs of all LRT (including currently running ones).

After clicking on magnifying glass next to the task there is task detail available. We can see the information about the running time, processed objects etc…