How to check if the schedule job is completed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
How to check if the schedued job is completed execution or not. In one of my scheduled job it got completed but error message comes up in the Job log table. Also state changes to ready.
How to check if scheduled job completed or not without any errors? how to find the execution history for the same?
Thanks,
Deepa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Check System Scheduler → Scheduled Jobs → Executions (sys_trigger) to see whether the last run finished and whether it shows an error.
Then check Job Logs (sys_job_log) for the run—this is where success or failure is recorded.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
in your scheduled job script always use try catch block to handle exception and add log before the code starts and before the code ends
this will help you tracking that job
runScript();
function runScript() {
try {
gs.info('Job started' + new GlideDateTime());
// your code here
gs.info('Job finished' + new GlideDateTime());
} catch (ex) {
gs.info("Exception in job" + ex);
}
}
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader