Welcome Guest.   Make a donation to an author on the site November 27, 2014, 07:17:50 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: How to schedule hibernation On/Off so can run overnite once a week  (Read 6780 times)
222fbj
Supporting Member
**
Posts: 53


View Profile Give some DonationCredits to this forum member
« on: April 18, 2007, 11:38:37 AM »

If I use Hibernation to save power...how can I keep the PC running, or wake it up, for batch/maintenance jobs?  Generally I schedule this once a week...but not sure what to do if I also want to save power with hibernate mode.

thanks for any solutions/ideas....

Barret
Logged
cthorpe
Discount Coordinator
Supporting Member
**
Posts: 719


c++thorpe

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #1 on: April 18, 2007, 12:14:48 PM »

I'm thinking maybe a AutoHotKey automation of opening power settings and disabling hibernate would do the trick.

These should work for Windows XP.  You may have to modify them for other flavors of windows.

Hibernate Off
[copy or print]
WinWait, Program Manager,
IfWinNotActive, Program Manager, , WinActivate, Program Manager,
WinWaitActive, Program Manager,
Send, {LWINDOWN}r{LWINUP}
WinWait, Run,
IfWinNotActive, Run, , WinActivate, Run,
WinWaitActive, Run,
Send, powercfg.cpl{ENTER}
WinWait, Power Options Properties,
IfWinNotActive, Power Options Properties, , WinActivate, Power Options Properties,
WinWaitActive, Power Options Properties,
Send, {CTRLDOWN}{TAB}{TAB}{CTRLUP}{SPACE}{ENTER}


Hibernate On - Change the number of {UP} on the last line to adjust the hibernate time.
[copy or print]
WinWait, Program Manager,
IfWinNotActive, Program Manager, , WinActivate, Program Manager,
WinWaitActive, Program Manager,
Send, {LWINDOWN}r{LWINUP}
WinWait, Run,
IfWinNotActive, Run, , WinActivate, Run,
WinWaitActive, Run,
Send, powercfg.cpl{ENTER}
WinWait, Power Options Properties,
IfWinNotActive, Power Options Properties, , WinActivate, Power Options Properties,
WinWaitActive, Power Options Properties,
Send, {CTRLDOWN}{TAB}{TAB}{CTRLUP}{SPACE}{ALTDOWN}a{ALTUP}{CTRLDOWN}{TAB}{TAB}{CTRLUP}{ALTDOWN}h{ALTUP}{UP}{UP}{UP}{UP}{UP}{ENTER}

You could compile those and then run them using Task Scheduler to stop the hibernation process.  The attached files should turn it off and turn it back on with a 3 hour delay.

* hiberon.exe (190.36 KB - downloaded 220 times.)
* hiberoff.exe (190.34 KB - downloaded 210 times.)
« Last Edit: April 18, 2007, 12:19:44 PM by cthorpe » Logged
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,958



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: April 18, 2007, 06:06:20 PM »

Do you use a network router?

If so you may be able to schedule the router to wake up your computer when you want. (My router has scheduling built into the config interface so it is easy to setup and means you wouldn't have to tweak your hibernation settings.) Remember to enable "Wake up on LAN" in your BIOS - that will depend on your BIOS settings and also what 'wake up' facilities are supported by your LAN card or WiFi adapter.

The system should then hibernate again when it has been 'on' for the usual time.
« Last Edit: April 18, 2007, 06:08:07 PM by Carol Haynes » Logged

db90h
Coding Snacks Author
Charter Member
***
Posts: 455


Software Engineer

View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: April 18, 2007, 06:21:21 PM »

Correct me if I'm wrong, but the Windows XP Scheduler has a checkbox for scheduled items that allows you to indicate you want the computer woken up. From what sleep levels it will resume, I dunno.
Logged
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,958



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: April 19, 2007, 04:23:26 AM »

I'm not sure but I don't think hibernation is a sleep state in that sense as you can remove power once it hibernated. Effectively the scheduler would need to be able to run when the system is powered down.
Logged

db90h
Coding Snacks Author
Charter Member
***
Posts: 455


Software Engineer

View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: April 19, 2007, 08:10:30 PM »

I'm not sure but I don't think hibernation is a sleep state in that sense as you can remove power once it hibernated. Effectively the scheduler would need to be able to run when the system is powered down.

Yea, I think you are right about not being able to wake up from hibernate, it does seem unlikely.

By 'sleep state' I was referring to sleep states S0-S5, of which hibernate is S4. So, its semantics there. Maybe the OP here doesn't really need to go to full hibernate -- especially if its a PC plugged into the wall. The power consumption is negligible with a lesser sleep state. Otherwise, I guess wake on lan is the best option, as a previous poster mentioned.
Logged
222fbj
Supporting Member
**
Posts: 53


View Profile Give some DonationCredits to this forum member
« Reply #6 on: April 19, 2007, 08:28:05 PM »

Hi and thanks for the help.   Based on some of the suggestions I found a BIOS upgrade to my dell allows me to turn it on (from shutdown state) at a predetermined time.  So that will be my solution for now.

I also have another PC that I'd like to power on for the same maintenance purposes..but have not found a bios upgrade for this pc that allows it to come alive.  So, am thinking to  use a 'Wake on Lan' signal sent to it.  I found some tools for sending a WOL packet  - from a linux box - but not from an XPHome box.  If anyone knows how to send a WOL packet from XPhome pls tell me.

thanks again to the helpful folks here at DonationCoder.
Logged
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,958



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: April 20, 2007, 03:40:39 AM »

Don't know whether it will work or not but why not get the Linux box to load a file from a shared folder on the XPHome box - I presume if the Linux box tries to access a network item on the XP box it should automatically wake up to service the request.

I may be a bit naive on that though!
Logged

222fbj
Supporting Member
**
Posts: 53


View Profile Give some DonationCredits to this forum member
« Reply #8 on: April 20, 2007, 08:12:39 AM »

I don't have a linux box....just two XPhome PCs, and a Linksys router.
Logged
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,958



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: April 20, 2007, 09:25:07 AM »

Sorry I misread your message (the perils of speed reading).

Unless it is a very old computer it should have WOL as standard in the BIOS? Or does it not work with your network interface?

Are you using an internal PCI card? Sometimes they need a short lead to connect it to pins on the  motherboard  to enable WOL (the one I have from Belkin has a two core cable with a connector which only needs to be installed if you plan to use WOL). Might be worth checking the motherboard manual (downloadable from the mobo manufacturer's website) and your Network card manual to see if it can be done.
Logged

cthorpe
Discount Coordinator
Supporting Member
**
Posts: 719


c++thorpe

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #10 on: April 20, 2007, 11:04:56 AM »

If the whole wake on lan thing doesn't work, I still think the AHK scripts I posted above could do what you need.  Set up the hibernate off to run sometime during the day that you want the machine to be on over night.  Then have the hibernate on script run sometime after you are sure that the scheduled tasks will be completed.  It results in a little more power consumption than a WOL solution, but it works.
Logged
Maggy160
Supporting Member
**
Posts: 12


View Profile Give some DonationCredits to this forum member
« Reply #11 on: May 04, 2007, 04:39:08 AM »

I tested the hibernate on/off scripts and as I expected it doesn't wake up at the set time.
In hibernate mode the machine's state is only "active" as the hibersys.fil on harddisk. You can pull the plug with no effect, it'll wake up as usual. I'm even not able to charge my cell phone on USB while in hibernate.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.031s | Server load: 0 ]