Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 17778

PowerTip: Find Missed Runs on Scheduled Task or Job

$
0
0

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           : \Microsoft\Windows\PowerShell\ScheduledJobs\

PSComputerName     :

 

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

0


Viewing all articles
Browse latest Browse all 17778

Trending Articles