PowerTip: Find Missed Runs on Scheduled Task or Job


Summary: Use Windows PowerShell to find the number of missed runs on a scheduled task or scheduled job.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find the number of missed runs on a scheduled task or scheduled job?

 Hey, Scripting Guy! Answer Use the scheduled task cmdlets:

PS C:> Get-ScheduledTask -TaskName MyScheduledJob | Get-ScheduledTaskInfo

 

LastRunTime        : 10/16/2013 10:20:20 AM

LastTaskResult     : 0

NextRunTime        : 10/17/2013 10:20:20 AM

NumberOfMissedRuns : 0

TaskName           : MyScheduledJob

TaskPath           : MicrosoftWindowsPowerShellScheduledJobs

PSComputerName     :

 

PS C:> (Get-ScheduledTask -TaskName MyScheduledJob | Get-ScheduledTaskInfo).NumberOfMissedRuns

0

Comments (0)

Skip to main content