Retrieve Job History based on a task execution - VisualCron - Forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Tjomme
8 years ago
Hi,

We're using VisualCron 8.2.4 and are implementing a VB.NET API to go through logs.
I'm able to get the job logs using GetJobHistory and the task logs using GetTaskHistory.

Is it possible to retrieve the job execution status/log of a job when you get the info from GetTaskHistory?
If a task is in error, we'd like to show the status and logs of the job that was executing the task.

Thanks,
Tjomme
Sponsor
Forum information
Support
8 years ago
The history only contains historic executions and not the current execution status. Or did you mean anything else?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Tjomme
8 years ago
Well I'm actually referring to something else. Let me clarify:
Via the server.jobs.GetTaskHistory() function I'm able to retrieve the execution history of a task within a job.
I would like to report the execution history of the job executing this task as well.
More or less the same as in the VisualCron interface where you can see the job execution history and expand it to see the execution history of each task within this job. This, but then starting from the execution history of a task if possible.
The main goal is to report the status of the main job when a task has failed.
Support
8 years ago
Originally Posted by: Tjomme 

Well I'm actually referring to something else. Let me clarify:
Via the server.jobs.GetTaskHistory() function I'm able to retrieve the execution history of a task within a job.
I would like to report the execution history of the job executing this task as well.
More or less the same as in the VisualCron interface where you can see the job execution history and expand it to see the execution history of each task within this job. This, but then starting from the execution history of a task if possible.
The main goal is to report the status of the main job when a task has failed.



The Task and Job share the same ExecutionId. So, you can extract the history for the Job based on the ExecutionId of the Task.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Tjomme
8 years ago
Hi,

How can you get the history of a job execution based on the executionID? Is there a function like GetTaskExecutionHistory (guidExecutionId) ?
Or do I need to loop the job history and compare executionIDs?

Thanks for the clarification,
Tjomme
Support
8 years ago
Yes,

you have:

serverObj.Log.GetTaskExecutionHistory(guidExecutionId)
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top