====== Status task - How to prepare the task ======
===== What is it? =====
CzechIdMStatusNotificationTask is a task which checks some major areas of CzechIdM and then sends to users or others (via email).
===== Preparation =====
This task is part of the module **extras**. You need to have this module.
1) Enable module extras
* **Settings** -> **Modules**
* Activate the module by clicking on the green button in the right side of the page in **extras** row.
{{ :tutorial:adm:xxx001.png?600 |}}
2) Later in this tutorial, you will choose identities to notify. Make sure, that they have email filled out if you want them to be notified by email.
* **Users** -> **select user** -> fill the **email** column
3) Set up emails which will be notified too
* Go to **Notifications** -> **Configuration**
* Here find **extras:status** as topic
{{ :tutorial:adm:xxx004.png?600 |}}
* Edit in left (a sign of magnifying glass)
* Add your emails to the Recipients field as shown in the picture and save
{{ :tutorial:adm:xxx005.png?600 |}}
Now we are prepared, let's create the task.
===== Create and run task =====
1) **Go to setting** -> **Task Scheduler** -> Scheduled tasks
{{ :tutorial:adm:xxx002.png?600 |}}
2) As shown in the picture, click to the green **Add** button in the right corner of the screen.
3) Type in **CzechIdMStatusNotificationTask** and other attributes of the form will pop up.
{{ :tutorial:adm:xxx003.png?600 |}}
4) Here is a quick reminder, what each of the attributes means.
* **Send provisioning status** - check and send failed provisioning operations
* **Send contract status** - check and send all new contracts
* **Send event status** - check and send failed events
* **Send LRT status** - check and send failed long-running tasks
* **Send sync status** - check and send failed sync operations
* **Recipient identities** - list of usernames of identities, to which notification will be sent - need to be divided by comma
5) Click save and then in the right of this row click **Play** button.
And it is done. Now you can check if you received the email.
Template of this task's notification has been modified in version 2.1.0 and in LTS version of module **extras**. You should redeploy notification template **statusNotification**.
If there are multiple errors during CzechIdMStatusNotificationTask, just the last one is send to notification template. The rest can be found in application log