The scheduled job wont fire the event.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2024 07:59 PM - edited ‎05-12-2024 08:01 PM
Hello,
I want to send notification to the users have the specific roles and las login time 30 days ago but my schedule job wont fire the event and won't send the notification to the users, did i missed something or my process is wrong i need help for this, thank you in advance.
Please see the attached images for reference.
Scheduled Job Script
var gr = new GlideRecord('sys_user_has_role');
gr.addEncodedQuery('user.last_login_timeRELATIVELT@dayofweek@ago@30^role.nameINchange_manager,sn_change_write,sn_chg_soc.change_soc_admin,sn_customerservice.consumer_agent,sn_customerservice.contact_manager,sn_customerservice_agent,sn_customerservice_manager,sn_esm_admin,sn_esm_agent,sn_lookup_verify_user,sn_majorissue_mgt.major_issue_manager,admin,catalog,catalog_admin,catalog_lookup_admin,flow_designer,import_scheduler,knowledge,knowledge_manager,search_application_admin,security_admin,sn_ace.ace_user,sn_hr_sp.admin,sn_hr_sp.esc_admin,teamdev_code_reviewer,itil,sn_incident_write,problem_coordinator,problem_manager,problem_task_analyst,sn_problem_write,sn_request_write');
gr.query();
while (gr.next) {
gs.eventQueue("remove.license", gr);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2024 08:28 PM
In the while () condition try:
while (gr.next()) {
gs.eventQueue("remove.license", gr);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2024 12:31 AM
Hello @sieusaopolo15
Still not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2024 12:57 AM
Hi @Community Alums ,
Then I think the issue here is your notifications, can you share us the notification settings like send to users with parm1 or parm2 like in this attachment ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2024 01:18 AM - edited ‎05-13-2024 01:22 AM