문제

I have to extract the runtime and some other information from the following query with the BusinessObjects XI Java SDK.

SELECT SI_STARTTIME, SI_ENDTIME, SI_NAME, SI_SCHEDULE_STATUS, SI_DESCRIPTION, SI_SCHEDULEINFO.SI_SCHEDULE_INTERVAL_MONTHS, SI_SCHEDULEINFO.SI_SCHEDULE_INTERVAL_NDAYS, SI_SCHEDULEINFO.SI_SCHEDULE_INTERVAL_NTHDAY, SI_SCHEDULEINFO.SI_SCHEDULE_INTERVAL_MINUTES, SI_SCHEDULEINFO.SI_SCHEDULE_INTERVAL_HOURS, SI_SCHEDULEINFO.SI_SUBMITTER FROM CI_INFOOBJECTS WHERE SI_INSTANCE=1

I have some trouble to extract the runtime of a scheduled job. I tried to subtract the endtime from the starttime but the result was wrong. I expected 5 seconds and 13897452000 seconds given.

Have anyone an idea how I could get the runtime of a scheduled job?

도움이 되었습니까?

해결책

Try using the ISchedulingInfo interface to retrieve the two dates. Load your IInfoObject (here named scheduledInstance) with the scheduling properties, then:

ISchedulingInfo schedInfo = scheduledInstance.getSchedulingInfo(); 
Date beginDate = schedInfo.getBeginDate(); 
Date endDate = schedInfo.getEndDate();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top