- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2021 09:39 PM
Is it possible to write a script in "Run Server Side Script" that will execute a timeout for 590 seconds?
Like this timeout in the picture.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2021 04:25 AM
you can use this in the run server side script step to pause for the seconds
(function executeStep(inputs, outputs, stepResult, timeout) {
var secondsValue = 590;
var seconds = parseInt(secondsValue, 10) * 1000;
var start = parseInt(new Date().getTime()) + seconds;
while(start>parseInt(new Date().getTime())){
// do nothing
}
stepResult.setOutputMessage('This step gave sleep of 590 seconds');
stepResult.setSuccess();
}(inputs, outputs, stepResult, timeout));
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2021 02:27 PM
Hi Ankur san,
Thank you for the information.
Did you succeed with this script?
Thanks and Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2021 09:32 PM
I have not tested this recently.
But when I used something similar few months back it did work
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader