5

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?

1 Answer 1

10

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.

2
  • Thanks for reminding me about sleep.exe, had totally forgotten about this little gem.
    – CGA
    Nov 26, 2009 at 9:44
  • 1
    Hmmm. Very good! But "at" command works only with admin privileges...... :(
    – kokbira
    May 10, 2011 at 19:51

You must log in to answer this question.

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