Page 1 of 1

how to get correct value of job end time using dsjob comamnd

Posted: Tue Feb 08, 2011 4:33 am
by chvenkat.v
Hi Team,

I have used the dsjob command to get job end time.
But I am getting wrong data for the same.

I have run the dsjob command on 2011-02-04

STATUS REPORT FOR JOB: Job name
Generated: 2011-02-04 06:31:12
Job start time=2009-04-02 18:33:10
Job end time=2011-02-04 06:31:12
Job elapsed time=00:00:00
Job status=99 (Not running)

SO could you please help on this.

Thanks
venkat.

Posted: Tue Feb 08, 2011 8:35 am
by chulett
Odd. Should it have been sometime in 2009? What does the job show for those values in the Director? If you rerun the dsjob command, do you get a new (i.e. current) value for the end time? Does it work properly for other jobs? :?

I have absolutely no idea what might be going on (just trying to gather information) and suspect you'll need to either Clear the Status file, export/import and/or rerun the job to fix things, that or contact your official support provider for guidance if the issue continues.

Posted: Tue Feb 08, 2011 12:14 pm
by ray.wurlod
Looks like it's reporting the date/time that dsjob was run. This is a bug, if reproducible, and should be reported to your official support provider.

Posted: Thu Feb 10, 2011 7:00 am
by Vinothbaskaran
Is it a multiple instance job by any chance?? I have seen this happening a few times only to find that it was multiple instance job.

Posted: Thu Feb 10, 2011 11:47 am
by kduke
99 means job is compiled. There is no start or end time on a just compiled job.

Posted: Fri Feb 11, 2011 5:08 am
by Vinothbaskaran
kduke wrote:99 means job is compiled. There is no start or end time on a just compiled job. ...
Exactly.. @Venkat: You are trying to get the timings of a multiple instance. So the start time is the when the job is last compiled and end time probably one of the instance which has finished recently.

Posted: Fri Feb 11, 2011 6:58 am
by chulett
OK, specifically - you are querying the 'base' Multi-Instance job (the one that always shows Compiled) rather than one of the actual instances. Use JobName.InvocationID in the dsjob command rather than just JobName.