Schedule Shutdown or Restarts in Windows using the Task Scheduler

While you can always use the Shutdown /s /t 60 command and create a desktop shortcut to delay shutdown of your Windows 10/8/7 computer by (in this case 60 secs) or make it shutdown at a particular time after calculating the time in seconds, you can also use the Task scheduler to shut down, restart or perform any action at one time or periodically.

Schedule Shutdown or Restarts in Windows

Using the Task Scheduler, you can schedule computer to shut down at a certain time in the night or any time! And why might you want to do this? Maybe your computer is processing a task or maybe it is downloading files from the Internet, and you do not want to wait till then. You can then schedule it to shut down after say 2 hours, while you go on to catch up on your beauty sleep!

To make your computer shutdown at a particular time, type taskschd.msc is start search and hit Enter to open the Task Scheduler. In the right panel, click on Create Basic Task.

Give it name and a description if you wish and click Next.

When asked When do you want the task to start, select One time. Click Next.

Select the Start date and time.

Clicking Next will bring you to the Action page. Here select Start a program and click on Next.

Here type shutdown on the Program/script space and /s /f /t 0 in the Add arguments box. If you want the shutdown to commence after say 60 sec, type 60 instead of 0 here.

Schedule Shutdown or Restarts in Windows

Click Next to review all and finally click Finish. Your computer will shutdown at the designated day and time.

NOTE: In a CMD window, you may run shutdown /? to see all the available switches. To schedule restarts, you need to use the /r parameter instead of the /s parameter. To log off the current user use /l.

If you are looking out for faster ways to do it, take a look at some of these free tools to Auto Shutdown, Restart Windows computer at fixed times.

Thanks Keith Hooker and Archie Christopher.

Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

21 Comments

  1. Gastly

    Thanks for the guide ! Is there a way to do this with any program ?

  2. Ian Connel

    Thanks for this! People like you make the internet great.

  3. kwinten couton

    Would this also work for putting your pc to sleep? and if so, what would go in the program/script bar?

  4. Keith Hooker

    Shouldn’t the “-s” parameter be “-r” if the user wants to restart?

  5. remcycle

    That’s correct. The article is written with shutting all the way down in mind and basically ignores the -r switch.

    shutdown /? from any CMD prompt will give you a list of switches.

  6. Thanks. Added a note towards the end.

  7. mike

    What about restarting instead of shutting down? Whats the command for that

  8. Kacem Bousnane

    how to turn this opstion off cuz my chois was daly

  9. Open Task Scheduler and delete that task.

  10. Archie Christopher

    Aren’t the flags /s /t 0 instead of -s -t 0? also I believe if you set a /t 0 it already forces it so /f is unnecessary.

  11. diana

    which tab would i go under the delete the task?

  12. Jake

    So did you ever share the “quick” way of doing this in a few clicks? I want to use this regularly, but not on a set schedule.

  13. Abdullah

    I have limited access to my PC
    however the task is working when I am logged in and active
    The problem when I am on locked screen the task does not work.
    Is there anyway to have the PC shutdown while it is on lock screen?

    Thanks

  14. helpful

    Add the “-r” flag to the arguments instead of “-s” (which is shutdown).

  15. haha

    Create a batch file on your desktop named “shutdown.bat” with the above shutdown command and switches. Double-click when you want to turn it your PC off.

  16. David

    You hit it on the head. I did your flags and worked like a charm.

  17. Thanks This trick was awesome and also save lots of electricity bills

  18. One for All

    Hello Anand! Is there a way to start that schedule if the machine can’t ping one specific network equipment?

  19. VulvaSniffer

    worked… great for restarting miners 😀

Leave a Reply

Your email address will not be published. Required fields are marked *


6 + 1 =