{"id":1032,"date":"2026-11-04T08:58:08","date_gmt":"2026-11-04T08:58:08","guid":{"rendered":"https:\/\/windows-vps.org\/blog\/?p=1032"},"modified":"2026-11-04T08:58:08","modified_gmt":"2026-11-04T08:58:08","slug":"scheduled-tasks-that-survive-reboot","status":"publish","type":"post","link":"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/","title":{"rendered":"Scheduled Tasks That Survive a Windows Reboot"},"content":{"rendered":"<p><strong>TL;DR \/ Summary:<\/strong> A scheduled task on a Windows VPS must survive reboots, missed runs, and a session that nobody is logged into. Configure it to run whether the user is logged in or not, and test after a real restart rather than a sign-out.<\/p>\n<h2>The three settings that decide everything<\/h2>\n<p>Task Scheduler offers many options, and three of them determine whether a task runs reliably on a remote server.<\/p>\n<p>The first is the user context: the account the task runs as must have the rights the task needs. The second is the &#8220;run whether user is logged on or not&#8221; option. The third is &#8220;run with highest privileges&#8221; for tasks that require elevation.<\/p>\n<p>A task that runs only when the user is logged in will fail silently on a server, because nobody is logged in most of the time.<\/p>\n<ul>\n<li><strong>Run whether user is logged on or not<\/strong> \u2014 required on a server<\/li>\n<li><strong>Run with highest privileges<\/strong> \u2014 required for admin operations<\/li>\n<li><strong>Do not store password<\/strong> \u2014 affects whether the task can access network resources<\/li>\n<li><strong>Start in<\/strong> \u2014 the working directory; omitting it breaks relative paths<\/li>\n<\/ul>\n<h2>Why the working directory matters<\/h2>\n<p>A scheduled task starts in the system directory by default, not in the script&#8217;s folder. A script that references a relative path will fail, and the error will look like a missing file rather than a path problem.<\/p>\n<p>Set the &#8220;Start in&#8221; field to the script&#8217;s directory. This single setting prevents a large share of scheduled-task failures.<\/p>\n<p>Better still, use absolute paths inside the script. Belt and braces is appropriate here, because the failure is silent.<\/p>\n<h3>Interactive versus non-interactive tasks<\/h3>\n<p>Some tools require an interactive desktop session\u2014older automation software, certain GUI applications, and anything that expects a visible window.<\/p>\n<p>Run those with a dedicated service account and consider whether the tool supports headless operation. Forcing an interactive task onto a server is a fragile arrangement that breaks on reboot.<\/p>\n<h2>Testing after a genuine restart<\/h2>\n<p>Signing out is not the same as rebooting. Many tasks appear to work after a sign-out and fail after a restart because the task&#8217;s dependency is not available at boot.<\/p>\n<p>Perform an actual restart and then check the task history. The history shows the last run result, including error codes that the UI does not explain.<\/p>\n<p>Test with the task set to run a few minutes after boot, and confirm the result. A task scheduled for 2 a.m. is hard to test immediately, so temporarily change the trigger.<\/p>\n<blockquote><p>A scheduled task that has never been tested after a reboot is an assumption, not automation.<\/p><\/blockquote>\n<h2>Missed runs and catch-up<\/h2>\n<p>Servers go down for maintenance. A task scheduled to run at a specific time will simply not run if the server is off, unless you enable the catch-up option.<\/p>\n<p>&#8220;Run task as soon as possible after a scheduled start is missed&#8221; is the setting that matters. Enable it for jobs that must not be skipped, and leave it off for jobs where a late run would be harmful.<\/p>\n<p>A backup job should catch up. A job that sends a daily email should probably catch up too. A job that resets a counter at midnight should not run late in the afternoon.<\/p>\n<h2>Credentials and stored passwords<\/h2>\n<p>Storing a password in a task is convenient and creates a maintenance burden: when the password changes, the task stops working, usually without a clear error.<\/p>\n<p>Use a service account with a password that does not expire, or better, a group managed service account where the domain supports it.<\/p>\n<p>If a task must access network shares, storing the password is often unavoidable. Document which account each task uses, so a password rotation does not silently break automation.<\/p>\n<h2>Logging and diagnosis<\/h2>\n<p>Windows Task Scheduler keeps a history, but it is verbose and often disabled by default. Enable task history and check it as the first diagnostic step.<\/p>\n<p>Have the task itself log to a file as well. Application-level logs are more useful than scheduler logs for understanding what the script did rather than whether it started.<\/p>\n<p>Log a start line, an end line, and an exit code. Three lines per run and a diagnostic problem becomes a five-minute investigation instead of an hour.<\/p>\n<h2>Monitoring the schedule<\/h2>\n<p>A task that stops running is invisible unless you are watching. Add an external check that expects a heartbeat\u2014a file written, a row inserted, an email sent.<\/p>\n<p>Alert on absence rather than on presence. The absence of a heartbeat is the only signal that matters, and it is the one that internal logging cannot report.<\/p>\n<p>Review the task list quarterly. Old tasks accumulate, and a disabled task someone forgot about is a future mystery.<\/p>\n<h2>A reliable starting configuration<\/h2>\n<p>Run as a service account, with &#8220;run whether the user is logged on or not&#8221; enabled, a &#8220;Start in&#8221; directory set, catch-up enabled, and logging inside the script.<\/p>\n<p>For remote administration, <a href=\"https:\/\/windows-vps.org\/\">Windows VPS<\/a> environments behave like any other Windows server here, and the same testing discipline applies.<\/p>\n<p>Scheduled tasks are one of the most reliable parts of Windows once configured correctly. The work is in the configuration and in the one restart test that most people skip.<\/p>\n<h2>Task dependencies and start order<\/h2>\n<p>A task that depends on a service must wait for that service to start. On a reboot, services start in an undefined order, and a task that fires early fails.<\/p>\n<p>Add a delay or an explicit dependency on the service rather than relying on timing. Explicit dependencies survive configuration changes that timing does not.<\/p>\n<p>Check the task history after a reboot for the first week. The failures are usually intermittent, and intermittent failures in automation are the ones nobody notices until they matter.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TL;DR \/ Summary: A scheduled task on a Windows VPS must survive reboots, missed runs, and a session that nobody is logged into. Configure it to run whether the user is logged in or not, and test after a real restart rather than a sign-out. The three settings that decide everything Task Scheduler offers many &#8230; <a title=\"Scheduled Tasks That Survive a Windows Reboot\" class=\"read-more\" href=\"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/\" aria-label=\"Read more about Scheduled Tasks That Survive a Windows Reboot\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":0,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1032","post","type-post","status-publish","format-standard","hentry","category-vps-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Scheduled Tasks That Survive a Windows Reboot - Windows VPS Blog<\/title>\n<meta name=\"description\" content=\"TL;DR \/ Summary: A scheduled task on a Windows VPS must survive reboots, missed runs, and a session that nobody is logged into. Configure it to run\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Scheduled Tasks That Survive a Windows Reboot\" \/>\n<meta property=\"og:description\" content=\"Scheduled Tasks That Survive a Windows Reboot\" \/>\n<meta property=\"og:url\" content=\"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/\" \/>\n<meta property=\"og:site_name\" content=\"Windows VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-04T08:58:08+00:00\" \/>\n<meta name=\"author\" content=\"windows-vps\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@myxiechengxuan\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"windows-vps\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/\",\"url\":\"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/\",\"name\":\"Scheduled Tasks That Survive a Windows Reboot - Windows VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\"},\"datePublished\":\"2026-11-04T08:58:08+00:00\",\"author\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\"},\"description\":\"TL;DR \/ Summary: A scheduled task on a Windows VPS must survive reboots, missed runs, and a session that nobody is logged into. Configure it to run\",\"breadcrumb\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/windows-vps.org\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Scheduled Tasks That Survive a Windows Reboot\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\",\"url\":\"https:\/\/windows-vps.org\/blog\/\",\"name\":\"Windows VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/windows-vps.org\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\",\"name\":\"windows-vps\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g\",\"caption\":\"windows-vps\"},\"sameAs\":[\"https:\/\/windows-vps.org\/blog\",\"https:\/\/x.com\/myxiechengxuan\"],\"url\":\"https:\/\/windows-vps.org\/blog\/author\/myxiechengxuan\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Scheduled Tasks That Survive a Windows Reboot - Windows VPS Blog","description":"TL;DR \/ Summary: A scheduled task on a Windows VPS must survive reboots, missed runs, and a session that nobody is logged into. Configure it to run","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/","og_locale":"en_US","og_type":"article","og_title":"Scheduled Tasks That Survive a Windows Reboot","og_description":"Scheduled Tasks That Survive a Windows Reboot","og_url":"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/","og_site_name":"Windows VPS Blog","article_published_time":"2026-11-04T08:58:08+00:00","author":"windows-vps","twitter_card":"summary_large_image","twitter_creator":"@myxiechengxuan","twitter_misc":{"Written by":"windows-vps","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/","url":"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/","name":"Scheduled Tasks That Survive a Windows Reboot - Windows VPS Blog","isPartOf":{"@id":"https:\/\/windows-vps.org\/blog\/#website"},"datePublished":"2026-11-04T08:58:08+00:00","author":{"@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58"},"description":"TL;DR \/ Summary: A scheduled task on a Windows VPS must survive reboots, missed runs, and a session that nobody is logged into. Configure it to run","breadcrumb":{"@id":"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/windows-vps.org\/blog\/scheduled-tasks-that-survive-reboot\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/windows-vps.org\/blog\/"},{"@type":"ListItem","position":2,"name":"Scheduled Tasks That Survive a Windows Reboot"}]},{"@type":"WebSite","@id":"https:\/\/windows-vps.org\/blog\/#website","url":"https:\/\/windows-vps.org\/blog\/","name":"Windows VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/windows-vps.org\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58","name":"windows-vps","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g","caption":"windows-vps"},"sameAs":["https:\/\/windows-vps.org\/blog","https:\/\/x.com\/myxiechengxuan"],"url":"https:\/\/windows-vps.org\/blog\/author\/myxiechengxuan\/"}]}},"_links":{"self":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/1032","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/comments?post=1032"}],"version-history":[{"count":1,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/1032\/revisions"}],"predecessor-version":[{"id":1033,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/1032\/revisions\/1033"}],"wp:attachment":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/media?parent=1032"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/categories?post=1032"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/tags?post=1032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}