[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 821
  • Last Modified:

Hibernate / Sleep mode Windows 7

Hi.
What I want to do is get my computer in Hibernate or Sleep mode 18:40
And then 07:00 I want it to start from Hibernate or Sleep mode..

I have look in powersave options and stuff but can only find shoutdown.

Best would be if I can write  .bat file for go to sleep and then one .bat to wake it again..

then run it from windows scheluguer...


//kavvis
0
kavvis
Asked:
kavvis
  • 2
1 Solution
 
XaelianCommented:
To automatically start your computer up at a specific time of day, you'll actually need to edit your BIOS settings. To do this:

Boot up your computer and enter your BIOS setup. Usually this involves pressing the Delete key as your computer boots (your computer should say Press DEL to Enter Setup or something similar as you turn it on).
Navigate to the Power Options. If your BIOS supports it, there should be a function for automatically starting up your computer at a certain time of day. Mine was called "Resume by Alarm", but yours might be called something different.
Enable that setting and set the time you want your computer to start every day. Save and Exit the BIOS, and your computer should follow that schedule from now on.

You probably shut down your computer when you're done using it at the end of the day, but if not, you can set it to shut itself down on a schedule. This is easy to do with Windows Task Scheduler:

Hit the Start menu and type in "task scheduler". Open up Task Scheduler from your results.
In the right pane, hit Create Task. Give it a name, and under the General tab, check "Run with highest privileges". Also check "Run whether user is logged on or not", if you ever leave your computer logged out.
Head to the Settings tab and check "Stop the task if it runs longer than" and set it to "1 hour". This won't stop your computer from sleeping, but will stop your computer from thinking a task is still running.
Head to the Actions tab, hit New, and choose "Start a Program" as your action. Set the Program to shutdown and the arguments to -s.
Lastly, head to the Triggers tab and click New. Change the schedule to fit whatever you want (say, Daily at 12:00AM), and hit OK. Hit OK again at the next window and your task should be saved in Task Scheduler.

That's it. Now your computer should shut down and wake up on your own schedule.
0
 
mgrooverCommented:
Scripting is definitely one way of doing it but will only support sleep mode to wake.

Put this in a scheduled task at 18:40
rundll32.exe powrprof.dll,SetSuspendState 0,1,0

Open in new window


and then just run a
cmd /c

Open in new window

at 07:00

If you want to go the hibernation path use the following command line instead:
rundll32.exe PowrProf.dll,SetSuspendState

Open in new window


When in hibernation mode your computer is turned off and will not be able to turn on through any operating system events. I would look in to what your BIOS offers in form of automatic timed power on!
0
 
kavvisAuthor Commented:
Thank you..
The settings was found in Boot.
And the shoutdown is perfect way to do it. Sometimes is verry simple!
0
 
kavvisAuthor Commented:
mgroover :


this works perfekt to put the computer into sleep
"rundll32.exe powrprof.dll,SetSuspendState 0,1,0"

But to get it to wake up I cant get to work..

Should I do the same thing as I need whit the last script?
cmd /c
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now