{"id":2519,"date":"2013-11-23T11:59:00","date_gmt":"2013-11-23T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2013\/11\/23\/powertip-find-missed-runs-on-scheduled-task-or-job\/"},"modified":"2013-11-23T11:59:00","modified_gmt":"2013-11-23T11:59:00","slug":"powertip-find-missed-runs-on-scheduled-task-or-job","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-find-missed-runs-on-scheduled-task-or-job\/","title":{"rendered":"PowerTip: Find Missed Runs on Scheduled Task or Job"},"content":{"rendered":"<p><strong>Summary<\/strong>: Use Windows PowerShell to find the number of missed runs on a scheduled task or scheduled job.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\">&nbsp;How can I use Windows PowerShell to find the number of missed runs on a scheduled task or scheduled job?<\/p>\n<p style=\"padding-left: 30px\">&nbsp;<img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\">&nbsp;Use the scheduled task cmdlets:<\/p>\n<p class=\"Code\" style=\"padding-left: 90px\">PS C:&gt; Get-ScheduledTask -TaskName MyScheduledJob | Get-ScheduledTaskInfo<\/p>\n<p class=\"Code\" style=\"padding-left: 90px\">&nbsp;<\/p>\n<p class=\"Code\" style=\"padding-left: 90px\">LastRunTime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 10\/16\/2013 10:20:20 AM<\/p>\n<p class=\"Code\" style=\"padding-left: 90px\">LastTaskResult&nbsp;&nbsp;&nbsp;&nbsp; : 0<\/p>\n<p class=\"Code\" style=\"padding-left: 90px\">NextRunTime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 10\/17\/2013 10:20:20 AM<\/p>\n<p class=\"Code\" style=\"padding-left: 90px\">NumberOfMissedRuns : 0<\/p>\n<p class=\"Code\" style=\"padding-left: 90px\">TaskName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : MyScheduledJob<\/p>\n<p class=\"Code\" style=\"padding-left: 90px\">TaskPath&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : MicrosoftWindowsPowerShellScheduledJobs<\/p>\n<p class=\"Code\" style=\"padding-left: 90px\">PSComputerName&nbsp;&nbsp;&nbsp;&nbsp; :<\/p>\n<p style=\"padding-left: 90px\">&nbsp;<\/p>\n<p class=\"Code\" style=\"padding-left: 90px\">PS C:&gt; (Get-ScheduledTask -TaskName MyScheduledJob | Get-ScheduledTaskInfo).NumberOfMissedRuns<\/p>\n<p class=\"Code\" style=\"padding-left: 90px\">0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Use Windows PowerShell to find the number of missed runs on a scheduled task or scheduled job. &nbsp;How can I use Windows PowerShell to find the number of missed runs on a scheduled task or scheduled job? &nbsp;&nbsp;Use the scheduled task cmdlets: PS C:&gt; Get-ScheduledTask -TaskName MyScheduledJob | Get-ScheduledTaskInfo &nbsp; LastRunTime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 10\/16\/2013 10:20:20 [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[47,56,370,356],"class_list":["post-2519","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-general-management-tasks","tag-guest-blogger","tag-june-blender","tag-powertip"],"acf":[],"blog_post_summary":"<p>Summary: Use Windows PowerShell to find the number of missed runs on a scheduled task or scheduled job. &nbsp;How can I use Windows PowerShell to find the number of missed runs on a scheduled task or scheduled job? &nbsp;&nbsp;Use the scheduled task cmdlets: PS C:&gt; Get-ScheduledTask -TaskName MyScheduledJob | Get-ScheduledTaskInfo &nbsp; LastRunTime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 10\/16\/2013 10:20:20 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=2519"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2519\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=2519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=2519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=2519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}