How to schedule your Windows to hibernate?


It happens sometime when we want to schedule shutdown or hibernate our Windows OS after a specific time of interval. If you are an advanced user, you must be aware of schedule shutdown option from a command line.

 

But how to schedule hibernate? In this small tips & trick post, I am going to share you the way to do this from command prompt itself. Continue reading to know the trick.

 

You must be aware of the command “shutdown” which you can invoke from a command prompt to logoff, shutdown, restart and even hibernate the system. You can pass “/t xx” as a command line parameter to the “shutdown” command to schedule shutdown or restart operation after xx seconds. But what if one wants to hibernate the system after “xx” seconds? The “shutdown /t xx /h” will not help you out.

 

To resolve this, there is an alternate way (we already know: everything in this technical world has workarounds) which uses the “ping” and “shutdown” commands altogether.

 

 

Here is the trick for your reference:

 

// hibernate your system after xx seconds
ping -n xx 127.0.0.1 && shutdown /h /f
 
// hibernate your system after 60 seconds
ping -n 60 127.0.0.1 && shutdown /h /f
 
// hibernate your system after 3600 seconds
ping -n 3600 127.0.0.1 && shutdown /h /f

 

 

First, the ping command will execute for “xx” no. of times. We already know that the ping command pings the specified address after 1 sec. of interval. So here one tick means one second. This will execute for “xx” seconds and once it completes, it will go for the next command i.e. “shutdown” in this case. As we specified “/h” as a command line parameter to this, it will actually do a hibernation of the system.

 

Hope this helps you a lot and will be able to schedule a hibernate in your Windows system. Drop a line below, if it helps. Don’t forget to share it in your network and help your friends learn about this trick. Connect with me on Twitter, Facebook to get all posts that I share. Cheers.


 


If you have come this far, it means that you liked what you are reading. Why not reach little more and connect with me directly on Twitter, Facebook, Google+ and LinkedIn. I would love to hear your thoughts and opinions on my articles directly. Also, don't forget to share your views and/or feedback in the comment section below.

4 comments

  1. Cool tricks, dude!

    ReplyDelete
  2. Why not use built in countdown timer :

    shutdown /h /f /t 3600

    ReplyDelete
  3. @ Anonymous He already explained why you can't do that above.
    The 'shutdown' command doesn't allow you to use '/t xx' with '/h'.

    @OP This is a great little trick, Thanks!

    ReplyDelete

 
© 2008-2016 Kunal-Chowdhury.com - Microsoft Technology Blog for developers and consumers | Designed by Kunal Chowdhury
Back to top