How can I shut down the PC after specified amount of time?

68

20

How would you go about turning you computer after a specified amount of time?

I listen music before I go to sleep and would like to be able to shutdown my computer after a specified amount of time. After ½ an hour say.

It would be cool if you could connect a desktop shortcut to a task in scheduler so you click the shortcut and ½ an hour later it shuts down.

andrew

Posted 2010-11-27T05:00:45.697

Reputation: 847

Answers

23

The original recommendation - TimeComX, is now only found on shared hosting sites and has been discontinued.

Via Lifehacker, this seems to be a worthy alternative (no personal experience):

Switch Off by AiryTec

Several features of note:

  • Schedule shutdowns by CPU usage levels, time, or remotely
  • Power saving calculator
  • Portable use (no install required - some note this version may not work on x64)

enter image description here
(image via developer)

studiohack

Posted 2010-11-27T05:00:45.697

Reputation: 13 125

112

Create a batch file, and put this code in it after the @echo off line:

shutdown -s -t 1800

The computer will shutdown 30 minutes (1800 seconds) after running the batch file.

To cancel a shutdown initiated by that batch file, you can go to StartRun and type:

shutdown -a

Or put that in its own separate batch file, then run it to cancel a shutdown.

Force Flow

Posted 2010-11-27T05:00:45.697

Reputation: 3 850

40

Here are simple steps to shutdown your computer after a specified time without any application!:

  1. Open the Run window (Windows Key+R) or (Start / All Programs / Accessories / Run).
  2. Key shutdown -s -t 1800:

SU215531 example

[1800(can be changed) is the number of seconds after which the computer will turn off.]

  1. Click on OK and your computer will turn off after the specified time (here 30 minutes).

You can change -s for alternatives as below:

options    effect
-l         to log off
-r         to reboot

gaston33

Posted 2010-11-27T05:00:45.697

Reputation: 399

5

Go to Control PanelPower OptionsChange Plan Settings and change the Put the computer to sleep after option to whatever you want.

Jeevan

Posted 2010-11-27T05:00:45.697

Reputation: 59

That is a bit long winded.can you think of something that is more automatic. Like a simple click of a desktop icon an my computer shuts down in 1/2 an hour. – andrew – 2010-11-27T05:09:31.600

2and that only puts the computer to sleep. I want to shut down the computer. – andrew – 2010-11-27T05:11:15.733

Well that setting is automatic -- once you set it one time, say to one hour, the system will then automatically go to sleep within an hour of your computer going idle (you don't have to run through the steps again). But yes, that will only let you put the PC to sleep. To shut it down, you would need to use a different program (like the one suggested below). – Jeevan – 2010-11-27T05:15:41.663

3

Shutdown Timer can do this for you, the free version meets your requirements.

enter image description here

Sandeep Bansal

Posted 2010-11-27T05:00:45.697

Reputation: 6 168

3

You can do this with task scheudler and a bat file

Create a bat file by: open notepad, and type the string

shutdown.exe /s /t 00

Save this file to your My Documents directory and name it Shutdown.bat (note the .bat extension and not .txt).

Then, open Task Scheulder (type task s from start menu)

Create a new task (not basic)

Give it a name

On idle

In Conditions tab, select start the task only if the computer is idle for 30 minutes

Now, in Actions tab, click New start a program and brose for your .bat file.

Click OK until it's saved!

All done!

As an aside, just be careful in regards that you may lose unsaved work; Also, this may not be desirable if a background update is running or a download etc

Dave

Posted 2010-11-27T05:00:45.697

Reputation: 24 199

0

Here is a simple VBScript that will shutdown Windows at a specified time

Set objShell = CreateObject("WScript.Shell") 

Dim Input
Input = "10:00"

'Input = InputBox("Enter the shutdown time here.","", "10:00") 

For i = 1 to 2

CurrentTime = Time & VbCrLf

If Left(CurrentTime,5) = Input Then

objShell.Run "shutdown -s -t 00", 0
WScript.Quit 1

Else

WScript.Sleep 1000

End If

i=i-1

Next

jhmnb

Posted 2010-11-27T05:00:45.697

Reputation: 31

This would only loop twice..... – Ramhound – 2016-04-22T23:17:49.020

-3

open start -> write cmd and open it.

Then write

shutdown /t -s 600 

(for, e.g., 600 seconds)

zxcvvb

Posted 2010-11-27T05:00:45.697

Reputation: 17

1Think you meant shutdown -s -t 600 here. Yours won't execute in its current syntax. – Will Webb – 2017-08-17T11:19:12.177

You'll have to add this to startup, but other than that this is probably the best way. – Jon – 2013-12-24T04:07:28.317

I don't see where this adds more info to the existing answers from Force Flow's or Dave Rook. It's always the same mechanic behind. – nixda – 2013-12-24T04:10:17.767