I am trying to get the NextRun for a job, I can see it in the GUI but powershell seems to return blank:

I was wondering if there was a way to get the next run time using powershell without having to calculate it from the schedule?
Many thanks
Colm
Code: Select all
Get-VBRJob -WarningAction SilentlyContinue | Where-Object {$_.IsScheduleEnabled} | Select-Object Name, @{n='NextRunTime';e={$_.ScheduleOptions.StartDateTimeLocal}}
Code: Select all
Get-VBRJob -WarningAction SilentlyContinue | Where-Object {$_.IsScheduleEnabled} | Select-Object Name, @{n='NextRunTime';e={$_.ScheduleOptions.StartDateTimeLocal}} | Sort-Object NextRunTime
Name NextRunTime
---- -----------
AUSVCENTER-NoTag 5/12/2020 04:05:00
DomainControllers 5/12/2020 12:25:00
AUSVCENTER-TagTest 5/12/2020 13:05:00
vCenterServers 5/12/2020 19:00:00
SOBRBackupTest 5/12/2020 22:00:00
Code: Select all
$job = Get-VBRJob -Name 'BackupJob'
$job.Options.JobOptions.RunManually
Did you have IsScheduleEnabled updating normally in the version you upgraded your VBR from?Sorry for the rant, it just feels like a worthless use of time rewriting scripts for 50+ customers because of this.
Code: Select all
$job = Get-VBRJob -Name 'BackupJob'
$jobSchedule = Get-VBRJobScheduleOptions -Job $job
$jobSchedule.NextRun
Users browsing this forum: No registered users and 28 guests