# Command Prompt - Delayed hibernation



## Jay_JWLH (Apr 30, 2008)

Okay, I've got something running from what I don't want to wait for it to finish. I also don't shut down my computer, I hibernate it.

So what commands can I use in command prompt to put the computer into hibernation after say... 30 minutes?

shutdown /h /t 1800 - This line does nothing for me.


----------



## usasma (Apr 11, 2009)

If the shutdown command that you specify doesn't work - what is the error message that it generates? If there's no visible error message, check your Event Viewer for errors after 30+ minutes.


----------



## Jay_JWLH (Apr 30, 2008)

Once you do it, it will show you the usage (as in... all the things you can type in and what they do). Nothing special in the Event Viewer. I assume it is just improper words I am using, however there isn't any examples on how to do it right on the internet.

If you know the answer, then feel free to post it to solve my curiosity. I use Mz Shutdown Scheduler now, which seems to do the job just fine.


----------



## jcgriff2 (Sep 30, 2007)

Does the system hibernate if you select "Hibernate"?

Run the command at elevated admin level -
START | type *cmd.exe* into the start search box | right-click on cmd.exe | select “Run as Administrator” 

```
shutdown /h /t 1800
```
Regards. . .

jcgriff2

`


----------



## jenae (Jun 17, 2008)

Hi, in XP there was no limit set to shutdown using shutdown.exe. However both Vista and Seven have a limit of 600 (ie 10 mins). There is no registry setting that I have found controlling this, got sick of searching when I tried long ago. I have a workaround this is a script I do not know who wrote it, from my notes:- 

Copy all below into notepad then "save as" call it shutdown.vbs, save to desktop, right click select open and a box will open you put your time in there. (in seconds).



```
Set objShell = CreateObject("Wscript.Shell")
strMsg = "Enter the shutdown timeout period (in Seconds)"
iSec = trim(InputBox (strMsg,"Shutdown timeout value",750))
if iSec = "" then wscript.quit
if iSec > 600 then
     iSleep = int(iSec) - 600
     iSleep = iSleep * 1000
     WScript.Sleep iSleep
     objShell.Run "shutdown.exe /s /t 600"
else
     objShell.Run "shutdown.exe /s /t " & iSec
end If
```
You will need to modify the script to add the h switch, do not know if it will work, have a play and see how you go.


----------



## Jay_JWLH (Apr 30, 2008)

Hibernation is enabled. My main power button is set to activate it, since I find hibernation faster and more useful than shutting down.

Even with elevated privliges, it still just gives me a list of uses. Going with what jenae said, reducing the time period doesn't help either (does nothing different).

And nah, it's cool, I don't need a Visual Basic Script file. You forgot to use /h instead of /s by the way. This was just something I wanted to do when I realised a download might have been taking a long time on my laptop, so I wanted to estimate it took about 30 minutes to complete, set it to hibernate in 30 minutes, and then I could go to sleep. By the time I found a program that does it, the download had finished.


----------



## jenae (Jun 17, 2008)

Hi, You may have been too quick:-



> You will need to modify the script to add the h switch, do not know if it will work, have a play and see how you go.


----------



## Jay_JWLH (Apr 30, 2008)

Oh right, I didn't read anything below the quote.


----------

