Automatic reboot task using Shutdown - will not fire


  1. Posts : 97
    Windows 7 Professional SP1
       #1

    Automatic reboot task using Shutdown - will not fire


    Howdy,

    I am trying to setup a simple Task Scheduler task to restart my HTPC every day at as specific time - but so far - no action on the task actually running.

    I have the task setup correctly (I believe) it's calling:

    C:\Windows\System32\shutdown.exe with the following arguments

    –r –f –t 0

    I have this set to run under the System account with highest privileges and it still will not fire. Cannot see anything in any logs anywhere.

    Other items of note:

    1. An instance of J.River Media Center is always running on the HTPC.
    2. This PC has auto login using a local account MEDIA-PC\Username

    What am I missing here?

    VP
      My Computer


  2. Posts : 10,485
    W7 Pro SP1 64bit
       #2

    Have you turned on History for all tasks?

    If so, what does it state happened?
      My Computer


  3. Posts : 97
    Windows 7 Professional SP1
    Thread Starter
       #3

    UsernameIssues said:
    Have you turned on History for all tasks?

    If so, what does it state happened?
    Just turned it on..and set a run in the next minute. Will see what it says.

    VP
      My Computer


  4. Posts : 7,107
    W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
       #4

    just a thought
    Do you need an argument depending on whether its in sleep or hibernation mode.

    Roy
      My Computer


  5. Posts : 1,025
    Linux Lite 3.2 x64; Windows 7, 8.1
       #5

    Without a password on the account, the Task setting ~run only when logged in~ becomes critical. Try toggling it from what it is. Sorry, I'm not on windows and can't be more specific.
      My Computer


  6. Posts : 97
    Windows 7 Professional SP1
    Thread Starter
       #6

    Here's what the history has to say...

    Task Scheduler successfully finished "{ea3f9488-eb63-42d2-b6cc-39d5a52b78e2}" instance of the "\Reboot HTPC" task for user "WORKGROUP\MEDIA-PC$".

    But while this task was executing - I am logged onto the PC via Remote Desktop - and was not disconnected. No evidence of anything to indicate a restart has occurred.

    The task fired and recorded it's steps but the PC is still up and never restarted.

    What gives?

    VP
      My Computer


  7. Posts : 97
    Windows 7 Professional SP1
    Thread Starter
       #7

    paul1149 said:
    Without a password on the account, the Task setting ~run only when logged in~ becomes critical. Try toggling it from what it is. Sorry, I'm not on windows and can't be more specific.

    Had the SYSTEM acct running it and when that is selected all the other options like "run when logged in" are disabled.

    Just set it back to my local account (as that's what is logged on) and checked the "only when user is logged on" option. See if that makes a difference.

    VP
      My Computer


  8. Posts : 97
    Windows 7 Professional SP1
    Thread Starter
       #8

    Just watched the task run and saw a quick little CMD box fly by - but no restart. This is bizarre.

    VP
      My Computer


  9. Posts : 6,330
    Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
       #9

    Vocalpoint said:
    I have the task setup correctly (I believe) it's calling:

    C:\Windows\System32\shutdown.exe with the following arguments

    –r –f –t 0
    Try adding the -s (shutdown) parameter to your task.
      My Computer


  10. Posts : 97
    Windows 7 Professional SP1
    Thread Starter
       #10

    Got it!

    It was "slashes - not dashes". Doh!

    Had to have my arguments set to:

    /r /f /t 5

    Instead of

    –r –f –t 5

    Watched it roll...display a message for 5 seconds and then a disconnect and restart!

    Thanks guys.

    Cheers!

    VP
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 08:22.
Find Us