Skip to main content

Schedulers

This feature enables to run a business logic repeatedly at a particular interval of time which could be set during the registration of a scheduler.

Schedulers are a core feature of keycloak and are provided as an option to be extended by developers.

Schedulers provide the following provider and provider factory to be extended.

SchedulerProvider
SchedulerProviderFactory


Any new scheduler must be registered under the mID admin dashboard, as shown in following image.


Scheduler Creation


Registered schedulers will be listed under Scheduler Service providers of server info in the mID admin dashboard, as shown in following image.


Scheduler Search


Dead User Event Scheduler

Dead User Events Scheduler to Listen for New Scheduler. This Event Scheduler allows the user and activation code to be produced in SSMS while they are already in IAM. Dead user events occur during user migration or due to SSMS connectivity issues. Based on the following name, a realm setting is introduced for storing the dead event pool, incase there's an issue while adding them to the system. If the value is set to true, the failed items will no longer be sent to the dead event pool.

Dead User Event Scheduler

Dead Event Cleaner Scheduler

Based on the specified deadEventTTL value in realm settings, the New Scheduler Dead Event Cleaner Scheduler will completely remove all dead events from the database. deadEventTTL: This controls the deletion of dead events based on timestamps, and the value should be a non-zero integer number in Days. If nothing is supplied, the value defaults to 7, i.e., seven days. If you set deadEventTTL to 2, for example. When you register the Dead Event Cleanup Scheduler, it will delete all of the dead events that were generated two days ago from the database.

Dead Event Cleaner Scheduler

Connector Events Scheduler

Connector Events Scheduler can now subscribe to numerous events as comma-separated values in the deviceEvents option under Realm Settings. For example, to subscribe to both events, use NEW_DEVICE and DEVICE_DELETION. All supported events will be unsubscribed when the scheduler is removed.

NEW_DEVICE - When we subscribe to this type of event, we get a callback after a new device is activated, i.e. registration.

DEVICE_DELETION - When we subscribe to this type of event, we get a callback when a device is removed.

Connector Events Scheduler

info

The event type for 'deviceEvents' can be set to a single event or several events separated by a comma, such as NEW_DEVICE and DEVICE_DELETION. NEW_DEVICE will be subscribed by default if 'deviceEvents' is not added or left null.