How to get all runtimes from a task ( planned and manuel triggered)

Topics: Examples
Jun 2, 2015 at 10:50 AM
Edited Jun 2, 2015 at 2:22 PM
i want to get a list of all runtimes from a task.
I have the following situation:

10:10 o'clock Task was planned
10:15 o'clock manuel triggered
10:20 o'clock manual triggered

With the method getRunTimes(), i get only the exectuion times for the planned one, not the manuel triggered.
Dim allRunsFromOneTask() As Date
allRunsFromOneTask = task.GetRunTimes(dStartdate.ToUniversalTime(), dEnddate.ToUniversalTime())
so i get the first one with getRunTimes-method and the last one with lastRunTime proberty but not the one in the middle.
allRunsFromOneTask(allRunsFromOneTask.Length - 1) = task.LastRunTime
Does someone have an idea ?
Jun 2, 2015 at 2:40 PM
This is likely due to how Microsoft implemented the GetRunTimes method in the native COM library. I'm guessing they go to the Event Log and look for entries and chose to skip manually run entries. You too can use the TaskEventLog to go through all events looking for those that are important to you.
Marked as answer by dahall on 9/1/2015 at 9:54 AM