Topic
  • 2 replies
  • Latest Post - ‏2012-09-06T09:26:57Z by vivekyadav
vivekyadav
vivekyadav
3 Posts

Pinned topic Retreiving a Crontask last run timestamp using webservice

‏2012-09-06T06:10:03Z |
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
    bportaluri
    67 Posts

    Re: Retreiving a Crontask last run timestamp using webservice

    ‏2012-09-06T09:02:20Z  
    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.
    Regards
    Bruno
  • vivekyadav
    vivekyadav
    3 Posts

    Re: Retreiving a Crontask last run timestamp using webservice

    ‏2012-09-06T09:26:57Z  
    Thanks so much Bruno. This works perfectly.

    regards,
    Vivek