Alternate way to run the ATF scheduler instead of windows Task Scheduler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 10:14 AM
I have a created a ATF scheduler and it will run daily with the help of Windows task scheduler. Sometimes, it's not working properly. Could anyone let me know that we have any alternative to run the suite scheduler rather than Task scheduler. Can we use anything available in ServiceNow to perform this activity

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2024 06:26 AM
Good day Tushar
I have done all of that but, how do I automatically start up the scheduled test runner? The only way I have been able to get the scheduled job to run successfully is if I leave a scheduled test runner running on my machine.
So far, it looks like we need to get the cloud runner store app so we can leave a scheduled runner going in that instead of dedicating a machine every night to having a scheduled runner going just so the job runs.
Is there another alternative? In the training I went through, they said that as of ROME, if a runner wasn't available, ServiceNow would start one matching the requirements specified in the schedule. This is not working, and I didn't find any system properties that needed to be set for this to happen.
Thanks for your help,
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2024 06:40 AM
I have used GlideAjax for simulating user actions. It allows you to invoke server-side functions from the client side and handle responses.
Create a new script include (let's call it ScheduledTestRunner) with the following server-side script:
// ScheduledTestRunner script include
var ScheduledTestRunner = Class.create();
ScheduledTestRunner.prototype = Object.extendsObject(AbstractAjaxProcessor, {
// Function to trigger the Scheduled Client Test Runner
triggerTestRunner: function() {
// do server-side actions here
// return a response indicating success or failure
return "Scheduled Client Test Runner triggered successfully.";
},
type: 'ScheduledTestRunner'
});
Create a GlideAjax script include (let's call it ScheduledTestRunnerAJAX) with the following client-side script:
// ScheduledTestRunnerAJAX GlideAjax script include
var ScheduledTestRunnerAJAX = Class.create();
ScheduledTestRunnerAJAX.prototype = Object.extendsObject(AbstractAjaxProcessor, {
// function to call the server-side triggerTestRunner function
triggerTestRunner: function() {
var ajax = new GlideAjax('ScheduledTestRunner');
ajax.addParam('sysparm_name', 'triggerTestRunner');
ajax.getXMLAnswer(this.onComplete.bind(this));
},
// Handle the response from the server
onComplete: function(response) {
// Log or handle the response as needed
gs.info(response);
},
type: 'ScheduledTestRunnerAJAX'
});
Now in your Scheduled Job, you can then call this GlideAjax script to simulate the user action:
// Scheduled Job script
try {
var ajax = new ScheduledTestRunnerAJAX();
ajax.triggerTestRunner();
} catch (error) {
gs.error('Error triggering Scheduled Client Test Runner: ' + error);
}
This is just an example, you need to update the server-side triggerTestRunner function in the ScheduledTestRunner script include to perform any necessary server-side actions before triggering the Test Runner.
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Regards,
Tushar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2024 11:06 AM
Thanks Tushar, for the quick response.
The issue I see with this solution, is that this is not a Server-side issue. The scheduled screen runner is launched from the finder in the ATF Menu options. Am I missing something?
My other question is, how do you programmatically launch a Scheduled client?
runner.