Business Rule needs to trigger only Monday to friday at 9AM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 01:52 AM
Hello,
In the users table we have one business rule and that business rule will create an incident whenever the user is Inactive.
Now our requirement is incident will create only at Monday - Friday at 9Am only.
How to write a schedule job to trigger that business rule only at the Mentioned time.
Can anyone let me know how to achieve this.
Thanks in Adavance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 01:55 AM
Might be helpful
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 02:01 AM
both the things are different.
Scheduled job is used when you want to perform an action at particular time i.e. weekly, daily, monthly
Business rule is something which will run whenever database operation is done
what's your business requirement?
Since you already have a BR please use GlideDateTime class and check day of week and the time and based on that create incident
what script did you start with and where are you stuck?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 03:23 AM - edited 01-23-2024 05:59 AM
Hi Ankur,
Our business requirement is ,We are experiencing an issue with system generated hardware recovery incidents. To be specific, these are for terminations that are generated due to account inactivity, etc. They seem to be created at random times, mostly during off hours and are causing us to breach SLA's.
Can we force the system to generate these tickets during work hours so that we can prevent these breaches?
We have one existing business rule and it will create incidents if the user status is inactive.
Now that business rule will trigger only on business days to prevent SLA breaches.
Thanks