Task uses script for search identities using pageable filter.
First task finds users by script, for every identity sends notification to defined topic.
Notification is implemented as long running task. You must go to Settings → Task scheduler → Scheduled tasks and in the agenda just plan new long running task with name send-notification-to-identities-by-script (SendNotificationToIdentitiesByScript).
The long running task has these configurations: