Check Job status

I am working on Sap project where our bot check Sap jobs and once jobs finished it send report.This portion i complete.

but when job are running at that time uipath bot drop mail to user that job are running.Again it will check job status after two hours.

Anyone provide code for this.