How to do a timed shutdown on your PC

Posted on

Recently I’ve stumbled upon a really neat technique to listening to Spotify while I’m heading off to bed, then not have to get up to turn my music off once I’m dropping off.

Firstly, set up a playlist in Spotify which will help you relax. Once you have done this step, open up command line (cmd.exe) and type the following:

shutdown -s -f -t 900

Code Breakdown

The above command will shutdown your PC in 900 seconds. Let me quickly break down how this command works:

Once this is command has been run you should see an information bubble (Like below) stating when the shutdown will occur.

An information bubble on windows 7 showing the computer is about to shutdown

How to abort

You may also want to abort your shutdown, in that case just put the following code into your command line:

shutdown -a

The -a flag stands for “Abort a system shutdown”.