Question Using Task Scheduler to restart Win 10 - Not Working

Apr 13, 2020
10
0
10
0
I wanted to have task scheduler restart windows 10 each night around midnight.
I found the script that was supposed to work (%SystemRoot%\System32\shutdown.exe -r -f -t)
Sadly, I can't get it to work properly. The results for this function in Task Scheduler are always 0x1 -- which means it didn't run.
I've searched the web for a solution -- nothing seems to work.
Any suggestions here are appreciated. If any solve the problem -- I will gladly report the results.
Thanks,
-gene
 
Apr 13, 2020
10
0
10
0
Unfortunately, I get "Parameters are incorrect" 0x80070057
I don't have the Pro version of Win 10 -- hope that's not an issue.
 
Another thing - shutdown script has to be run with administrative privileges.

Make sure your Task Scheduler job has "Run with highest privileges" checkbox filled.
And user running it, has to be in Local Administrators group.

 
Apr 13, 2020
10
0
10
0
Good news folks. Apparently, I finally hit on the correct syntax and my system rebooted as desired last night.
Thanks, guys, for all the help.
One of the best forums I've found.
-gene
 

ASK THE COMMUNITY