-1

On a windows machine running Windows Update via the built-in service (not GPO), I would like to have it automatically restart every morning at 5:30AM, only when required by WU.

The event log entry for a restart required by WU is as follows:

enter image description here

I can scheduled a task with a trigger of 5:30AM every day. I can scheduled a task with a trigger that looks for the event above. But I cannot create a task that only runs when both triggers are satisfied or create an event log trigger that delays action until 5:30AM after the event is detected or create an event log trigger that runs itself at 5:30AM and checks to see if the event happened in the prior 24 hours.

How can I create a task that only runs at 5:30 every day after the event is logged?

Gaia
  • 1,777
  • 4
  • 32
  • 58
  • 3
    Why is it you don't want to configure the computer to install Windows Update and reboot at 5:30 AM every day? – I say Reinstate Monica Feb 25 '15 at 21:31
  • It is not a real answer, but I hope it will be helpful. Problem sounds like reversal of what I experienced several times. Windows Update often set up for automatic restart after updating. This comes in very handy when you run overnight experiment and PC restarts at ~3am. So OP's problem solution might be in the same plane. [This page](http://www.techspot.com/guides/230-prevent-automatic-windows-update-restarts/) describes several ways how to _disable_ restarting. My expectation is that reversal of mentioned actions will satisfy OP. – aaaaa says reinstate Monica Feb 25 '15 at 21:24
  • [The vastly easier way is to just enable auto-rebooting with registry entries or GPO](http://www.sevenforums.com/tutorials/6042-windows-update-enable-disable-automatic-restart.html), and control when you install updates, but... this is another approach too, I guess. – HopelessN00b Feb 25 '15 at 22:32

2 Answers2

0

I would write a small VBScript or PowerShell script that is set in task scheduler to execute at 5:30am every day that grabs a collection of all of the events from the event logs for that day and checks for that specific event id and log entry. If that event exists, execute the reboot.

Here are some links that may help you:

https://technet.microsoft.com/en-us/library/hh849834.aspx

https://technet.microsoft.com/en-us/library/hh849837.aspx

Jeff Coe
  • 187
  • 2
  • 6
0

I'm assuming this is a local machine (not domain joined), as you are not using GPO.

Open the Local Policy Editor (Start>Run>gpedit.msc) and browse to Computer Configuration\Administrative Templates\Windows Components\Windows Update and look for the Configure Automatic Updates. Enable that policy, and set the option for "Auto download and install" and set your install day for Every day and an install time of 05:30.

DanBig
  • 11,393
  • 1
  • 28
  • 53