- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 03:03 AM
Hi Team,
can anyone help me in the script how to call script include and its function from schedule job for every 24 hours i have to call the script include from schedule job
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 03:15 AM - edited 05-07-2025 03:16 AM
Hi @shabbir9
If Scheduled job and script include is in the same scope, then
var obj = new SCRIPT_INCLUDE_NAME().FUNCTION_NAME();
For calling the global Script include from scoped app
var obj = new global.SCRIPT_INCLUDE_NAME().FUNCTION_NAME();
Please refer Use script includes | Servicenow Docs
Hope that helps!
Regards,
Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 03:07 AM
the scheduled job can be configured to run daily
Syntax is same as that of any server side script
new ScriptIncludeName().functionName()
what did you try and what didn't work?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 03:09 AM
Would you mind closing your earlier questions by marking appropriate response as correct?
Members have invested their time and efforts in helping you.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 03:15 AM - edited 05-07-2025 03:16 AM
Hi @shabbir9
If Scheduled job and script include is in the same scope, then
var obj = new SCRIPT_INCLUDE_NAME().FUNCTION_NAME();
For calling the global Script include from scoped app
var obj = new global.SCRIPT_INCLUDE_NAME().FUNCTION_NAME();
Please refer Use script includes | Servicenow Docs
Hope that helps!
Regards,
Arun