Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to suspend my windows machine after a specified time like

shutdown -s -t 3600

but I don't want to turn it off, but only switch to suspend mode. Is there a command line to do this?

share|improve this question
up vote 10 down vote accepted

Use the at command, running the command to put the computer to sleep. The shutdowncommand doesn't have a sleep parameter.

at <time> rundll32 powrprof.dll,SetSuspendState

you'll find more information about at and its parameters here.

Instead of the rundll32command, you could use an alternative command-line program, like sleep.exe for instance.

share|improve this answer
    
Thanks for reminding me about sleep.exe, had totally forgotten about this little gem. – CGA Nov 26 '09 at 9:44
    
Thanks for the quick answer. – tangens Nov 26 '09 at 20:24
1  
Hmmm. Very good! But "at" command works only with admin privileges...... :( – kokbira May 10 '11 at 19:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .