s=getVC_Connection();
if (s != null)
{
if (s.Connected)
{
List<JobClass> allJobs = s.Jobs.GetAll();
foreach (JobClass j in allJobs)
{
List<LogJobHistoryClass> Logs = s.Log.GetJobHistory(j.Id.ToString(), new DateTime(2014, 8, 4), new DateTime(2014, 8, 12));
foreach (LogJobHistoryClass L in Logs)
{
if (L.ExitCodeResult == ExitCodeClass.ExitCodeResultT.Failure)
{
List<LogTaskHistoryClass> T = s.Log.GetTaskExecutionHistory(L.ExecutionId);
//T.Count is always 0 here
}
dtbl_JobHistory.Rows.Add(newJobHistRow);
}
}
}
}
What is the preferred way to extract the reason why a job failed during a particular Execution ID? Im stuck due to the fact that at the Job level where I am iterating I dont know what TaskPID that failed during job execution. Is this really the TaskID, or a PID?
Im not getting anything returned whenever I try to get the log information via Log.GetTaskExecutionHistory. Im attempting to get to the "StdErr" output, but i cant even get to the instance of the failed log.
Edited by user
2014-08-12T15:24:56Z
|
Reason: Add additional Information