Automation of Time validation In ITSM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 09:06 AM
Hi All,
I have filed " On hold time " on incident table and its a date time filed and my requirement to automate the time validation from current time (which means system time ) to on hold time filed . when i entered the date and time in the onhold time filed then it should compare with the current system field and if the system time is greater then the provided time then state of the incident has to be changed from On hold to InProgress.
Ex : On hold time ( 06/11/2023 ,22:40 : 46 ) , current time : system time .
i have written the script and tried with background script its working fine but when i am using the Business rules to do it its not working. How Can i automate the Process. Please find the attached script below. Is there any way to automate the process and do i need to change anything in the script.
Script :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 09:20 AM
@sushma9 Instead of using this script in a business rule, you should use it in a scheduled job which should run at an interval of 5mins and execute the above script. Once the current date time value exceeds on hold date time, if (gdt > result_Value) will execute and will change the state of incident from on hold to in progress.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 09:23 AM
But Running Schedule for Every 5 or 10 mints is not Good Practice i think . Can you please let me know if any other solution is there apart from schedule Job.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 09:29 AM
@sushma9 You can choose to increase the running schedule from 5mins to an hour or more depending upon your requirement.
If you do not wish to use the scheduled job then you can choose to create a flow/workflow which will trigger the moment incident goes into On hold state, you can use a timer activity inside your flow/workflow which will wait till u_on_hold_time and will update the incident duration to in-progess once the on hold duration is elapsed.
Hope this helps.