how to schedule a daily hibernate/wakeup for windows


New member
Jul 25, 2012
Programming Experience
hi, am currently trying to develop a small app which would automatically say hibernate the PC at 8pm and wake it up at 8AM the next day. anyone can help me with this part?

I can currently control the wake up using a date time picker by setting the date and time I want it to wakeup, but I must put it to sleep/hibernate manually to be able to do so. I would like instead to make both processes automatic ones based on the time (irrespective of the day/date).
If your machine is asleep then how is it going to run your code to wake it up? That's like saying that you want to wake yourself up in the morning. If you're asleep then how are you going to wake yourself up? The only way to start or wakeup a PC is via hardware, not software.
Windows Task Scheduler does have a "Wake the computer to run this task" condition.
Shutdown.exe can be called with switches to hibernate.
am referring to the code on this link for my app but modified mine to include hibernate as well:
Wake the PC from standby or hibernation - CodeProject

However, in it, everytime one has to set the wake up time, and instead I would like it to be automated using a scheduler as explained earlier for both the wakeup and hibernate, knowing that it has to be in the wake up state to go to hibernate and vice-versa...
Don't you think this would be easiest done adding wake/sleep tasks in Task Scheduler?
Tasks can be managed programmatically too if needed, for example using this Task Scheduler Managed Wrapper

Latest posts

Top Bottom