05-05-2014 04:44 AM
Hello everybody,
i was wondering whether there's a easy method to get the last expected start time of a backup job. I found
(Get-BEJob | select -First 1).Schedule
But with these information the last expected (!) start time has to be hardly calculated manually.
I am looking for a easy parseable variable which can be used to determine wheter a job has successfully started at the last start time.
Thanks in advance.
05-05-2014 08:22 AM
05-08-2014 11:28 AM
Hi lufist,
BEJob has a "NextStartDate" property -- it's a DateTime object, not a string -- so no parsing necessary.
We added formatting to many object types in BEMCLI so they look better in the console by default -- but this also hides many useful properties. To see all of them, use "Format-List * -Force" like so:
Get-BEJob | Select -first 1 | Format-List * -Force
That will show you every possible property of a BEJob.
Hope that helps you out!
-Kirk out.
05-12-2014 11:12 PM
Thank you very much. Is there also a property which gives the last expected start time?
05-13-2014 11:40 AM
No, there isn't a property for the last expected start time. However, as pkh suggested, you may be able to get what you're looking for by examining the most recent job history related to the job you're trying to learn that info from:
$history = Get-BEJob "Job Name" | Get-BEJobHistory | Select -First 1
Here, the $history variable would have the latest job history object. Perhaps its StartTime would help?