Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/12/2022 12:54 PM
We have had issues with jobs failing to run or getting stuck running for hours. We have adjusted the scheduling of some of these jobs to hopefully alleviate these issues but would also like to see if it;s possible to query the job status and generate emails to our team if a job does not complete in a certain time frame.
I was looking into the "Check Job Status" endpoint under "Common Utilities". No matter what values I send with the request I receive a return value of "COMPLETED".
Has anyone else been able to utilize this endpoint successfully?
Solved! Go to Solution.
04/12/2022 01:49 PM
Hi Steve,
I have looked into the problem, the msg tag of the response displays the status of the job i.e. in-progress, completed and error code tag would display the error code if encountered any issue.
The error code is not displaying the correct value. I would request you to open a FD ticket for this issue we will take it forward.
Thanks
Ajay
04/12/2022 01:49 PM
Hi Steve,
The reason why the checkJobStatus API was returning "Completed" even though the job was running might be because we need to pass WSRETRYJOB instead of WSRETRY for the jobname. We need to pass the value which is in brackets as job name, which is WSRETRYJOB in this case.
Please refer to the attached screenshots where status is showing as In-Progress as the job is running.
Lastly for your query " Is it possible to query the job status and generate emails to our team if a job does not complete in a certain time frame?"
We have runJobTrigger API to run trigger chain job(which can have the wsretry job and emailhistory job in the trigger chain) and fetchJobMetadata API to get job status of the trigger chain job. This is available as part of 5.5.0 release and would be available as part of the documentation also.
I hope this clarifies your concerns. Please free to revert back incase of any queries.
Thanks
Ajay
04/12/2022 01:49 PM
Thanks Ajay! Looks like you are correct and I was using the wrong value. I appreciate the help.