Xangrim
Xangrim

Reputation: 153

Windows Scheduled Task not working after a reboot

I have created scheduled tasks to run each day at various times in the morning, on 6 different machines, all running Windows 7 x64.

These tasks have largely worked over the last few years, but we have a persisting issue with tasks not triggering at times, and never after a restart.

Without touching the Task Scheduler application at all, restarting the machine will mean that the next time the task is meant to be triggered, it doesn't work.

Running any task manually after the restart appears to avoid the issue.

This issue exists for scheduled batch files and PowerShell scripts.

Is there a specific setting that is needed to keep the task working after a system restart, or is this a known outstanding issue?

The most recent time this happened, we have captured the history:

Error       | 27/02/2017 03:15:00 | 101 | Task Start Failed
Information | 27/02/2017 03:15:00 | 107 | Task triggered on Scheduler

Result code for failure: 2147943645

Update 2017-03-01: One machine doesn't work and produces the above error, and another machine shows nothing at all. Clutching at straws about this issue here.

If I tick the box 'Run whether user is logged on or off' The task is invisible. We can't do this. Any other suggestions are welcome!

Update 2017-03-02: Ticking 'Run whether user is logged on or off' is causing no end of issues. None of our Access macros run anymore, and other 3rd party applications called from the batch don't work with numerous permission errors. This is not the solution!

Upvotes: 7

Views: 19328

Answers (3)

Dan
Dan

Reputation: 21

This issue got resolved by updating 2 options in tasks.

  1. Set task to “Run as soon as possible after a scheduled start is missed” in the settings tab.
  2. Set expiry for task in trigger tab

But if you have multiple jobs like us. updating every job manually is an tedious work.

This PowerShell script I wrote will help you with that.

Upvotes: 2

Amir Vossuq
Amir Vossuq

Reputation: 11

For me I had to change «for a duration of..» to «Indefinitely» and had to change the «Daily» to «One time»

Upvotes: 1

beachgreatsquaremoon
beachgreatsquaremoon

Reputation: 97

This can occur if the task trigger was set to run One Time when created. It is possible to set a task to "Run as soon as possible after a scheduled start is missed". This will cause the task to re-run after a reboot if the trigger was missed. However, this does not occur if the task is set to run One Time. This behaviour is by design.

You can work around this issue by setting a time and date under the Expire option of the task. This option can be reached by opening the Properties of the task, selecting the Triggers tab, and then clicking the Edit button for the trigger in question. If a date and time are set for the Expire option, the task will attempt to refire on reboot if its previous trigger time was missed.

I suggest you to set the trigger to "At startup". After you rebooted the machine, the task should then be in the "Queued" status. This means it will run at the configured interval.

Upvotes: 1

Related Questions