Pinned topic Retreiving a Crontask last run timestamp using webservice
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Is there a way to retrieve Crontask's Last Run Timestamp by using a webservice? Is there any other way to retreive it without directly running SQL on database?
Updated on 2012-09-06T09:26:57Z at 2012-09-06T09:26:57Z by vivekyadav
bportaluri 120000GS1X67 Posts
Re: Retreiving a Crontask last run timestamp using webservice2012-09-06T09:02:20ZThis is the accepted answer. This is the accepted answer.Sure!
The information you need is stored in CRONTASKHISTORY.STARTTIME.
Create an Integration Object called MXCRONHIST and add CRONTASKHISTORY as source object.
Follow the instructions described in this post to call the MXCRONHIST Object Service with an HTTP call.
This HTTP request extracts the last start time of the WOMaterialStatusUpdateCronTask.
<max:QueryMXCRONHIST xmlns:max= "http://www.ibm.com/maximo"> <max:MXCRONHISTQuery> <max:WHERE>CRONTASKNAME= 'WOMaterialStatusUpdateCronTask' and ENDTIME=(select max(ENDTIME) from CRONTASKHISTORY where CRONTASKNAME= 'WOMaterialStatusUpdateCronTask')</max:WHERE> </max:MXCRONHISTQuery> </max:QueryMXCRONHIST>
This article describes a similar procedure to do the same with a Web Service.