| Windows 7: Power Mgmt: Is there a way to Shutdown after idle time period? |
28 Dec 2011
|
#1 | | Windows XP Pro SP3, Windows 7 Pro 32-bit, Windows 7 Ultimate 64bit, Windows XP Home SP3 Tejas, northern Mexico |
Power Mgmt: Is there a way to Shutdown after idle time period? friends
I have a rig I use occasionally, as HTPC and occasional mule work, file service, etc.
I would like to not have it simply sleep when I have left it running and not returned, but rather have it shutdown properly.
Is there a way to do this within Windows 7 controls, or is there an aftermarket, shareware, or scripting way to do so?
thx
z | My System Specs |
| System Manufacturer/Model Number HP DC7600, HP DC7600[2], HP DC7100, Samsung NC10 OS Windows XP Pro SP3, Windows 7 Pro 32-bit, Windows 7 Ultimate 64bit, Windows XP Home SP3 CPU Pentium 4 3.2GHz, Pentium 4 3.4GHz 64bit, Atom, Motherboard Dunno Memory 4GB matched, 1GB, 2.5GB, 4.0 GB Graphics Card Geforce 8400 GS and others Sound Card RealteK ALC260 and others Monitor(s) Displays Asus HD Screen Resolution 1920x1080 Cooling We Be Cool Hard Drives WD Caviar 640gb SATA |
28 Dec 2011
|
#2 | | Windows 7 Home Premium 64 Bit Colorado |
Create a batch file and link to it with Windows Task Scheduler and have the scheduler run whenever the computer has been idle for xxxx seconds/minutes.
In the batch file:
shutdown /s /t 300
Shuts down the computer in five minutes forcing all applications to close. You can change it to less time if you want. 300 seconds is five minutes arbitrarily chosen. | My System Specs | | System Manufacturer/Model Number HP Pavilion e9110t OS Windows 7 Home Premium 64 Bit CPU Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz Motherboard Pegatron IPIEL-LA3 Memory 6.00 GB Hundai HMT125U6BFR8C-H9 Graphics Card ATI Radeon HD 4850 Sound Card Realtek High Definition Audio/ATI High Definition Audio Monitor(s) Displays Acer AL2216W Screen Resolution 1680x1050 Keyboard HP Keyboard Mouse HP Mouse PSU Unknown/installed by HP Case HP generic case Cooling Intel Stock Cooling Hard Drives Hitachi HDP725050GLA360 ATA Device 500 GB Internet Speed Download: 19.15 Mbps Upload: 1.67 Mbps Other Info Network Adapter Realtek RTL8168D/8111D Family PCI-E Gigabit Ethernet NIC (NDIS 6.20)
Network Adapter 802.11n Wireless PCI Express Card LAN Adapter |
28 Dec 2011
|
#3 | | Windows 7 Home Premium 64 Bit Colorado |
To create a batch file:
1. Click Start Menu
2. Click All Programs
3. Click Accessories
4. Click notepad
5. save as sd.bat (change "save as type: All Files") within the Users\myusername\Documents folder (myusername is your user name you login under)
6. Type shutdown /s /t 300 (or however many seconds you want greater than 0)
7. save the batch file.
Now we need to link to it using task scheduler:
1. Click Start Menu
2. Type "Task Scheduler" (without quotes) into the Search programs and files (do not hit enter)
3. Right click on Task Scheduler and select Run as administrator
4. Click Action -> Create Task...
5. Type name as sd.bat
6. Choose whether to run whether user is logged on (do not check the Do not store password box if you want the task to run when the user is not logged in)
7. Put tick next to Run with highest privileges (this setting may cause the task not to save, so uncheck if you have issues at the end of these steps)
8. Configure for Windows 7
9. Click the Triggers tab
10. Begin the task: On Idle
11. Make sure a check is in the Enabled box.
12. Hit OK
13. Click the Actions tab
14. Action: Start a Program
15. Browse for sd.bat
16. Click OK
17. Click the Conditions tab
18. Start the Task if the computer is idle for (However long you want to wait for it to shutdown without a user using the computer).
19. Wait for idle for: Do not wait
20. Stop if the computer ceases to be idle (if you want the user to have a chance to stop the shutdown).
21. Set up the power settings as you would like
22. Click the Settings tab
23. Set the settings to your liking. (If you have questions, just ask)
24. Hit OK
Last edited by writhziden; 28 Dec 2011 at 01:00 PM..
Reason: Changed Task Scheduler opening
| My System Specs | | System Manufacturer/Model Number HP Pavilion e9110t OS Windows 7 Home Premium 64 Bit CPU Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz Motherboard Pegatron IPIEL-LA3 Memory 6.00 GB Hundai HMT125U6BFR8C-H9 Graphics Card ATI Radeon HD 4850 Sound Card Realtek High Definition Audio/ATI High Definition Audio Monitor(s) Displays Acer AL2216W Screen Resolution 1680x1050 Keyboard HP Keyboard Mouse HP Mouse PSU Unknown/installed by HP Case HP generic case Cooling Intel Stock Cooling Hard Drives Hitachi HDP725050GLA360 ATA Device 500 GB Internet Speed Download: 19.15 Mbps Upload: 1.67 Mbps Other Info Network Adapter Realtek RTL8168D/8111D Family PCI-E Gigabit Ethernet NIC (NDIS 6.20)
Network Adapter 802.11n Wireless PCI Express Card LAN Adapter |
28 Dec 2011
|
#4 | | Windows XP Pro SP3, Windows 7 Pro 32-bit, Windows 7 Ultimate 64bit, Windows XP Home SP3 Tejas, northern Mexico |
terrific;
I'll give it a shot writh.
gracias
[ps on that failed HDD - I haven't given up. will be posting back an update]
z 
Quote: Originally Posted by writhziden Create a batch file and link to it with Windows Task Scheduler and have the scheduler run whenever the computer has been idle for xxxx seconds/minutes.
In the batch file:
shutdown /s /t 300
Shuts down the computer in five minutes forcing all applications to close. You can change it to less time if you want. 300 seconds is five minutes arbitrarily chosen. | My System Specs | | System Manufacturer/Model Number HP DC7600, HP DC7600[2], HP DC7100, Samsung NC10 OS Windows XP Pro SP3, Windows 7 Pro 32-bit, Windows 7 Ultimate 64bit, Windows XP Home SP3 CPU Pentium 4 3.2GHz, Pentium 4 3.4GHz 64bit, Atom, Motherboard Dunno Memory 4GB matched, 1GB, 2.5GB, 4.0 GB Graphics Card Geforce 8400 GS and others Sound Card RealteK ALC260 and others Monitor(s) Displays Asus HD Screen Resolution 1920x1080 Cooling We Be Cool Hard Drives WD Caviar 640gb SATA |
28 Dec 2011
|
#5 | | Windows 7 Home Premium 64 Bit Colorado |
Change step 10 as follows:
10. Begin the task: On Idle -> Begin the task: At system startup.
Delay task for 15 minutes.
Have it repeat the task every 15 minutes for a duration of indefinitely (in case the user stops the task). | My System Specs | | System Manufacturer/Model Number HP Pavilion e9110t OS Windows 7 Home Premium 64 Bit CPU Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz Motherboard Pegatron IPIEL-LA3 Memory 6.00 GB Hundai HMT125U6BFR8C-H9 Graphics Card ATI Radeon HD 4850 Sound Card Realtek High Definition Audio/ATI High Definition Audio Monitor(s) Displays Acer AL2216W Screen Resolution 1680x1050 Keyboard HP Keyboard Mouse HP Mouse PSU Unknown/installed by HP Case HP generic case Cooling Intel Stock Cooling Hard Drives Hitachi HDP725050GLA360 ATA Device 500 GB Internet Speed Download: 19.15 Mbps Upload: 1.67 Mbps Other Info Network Adapter Realtek RTL8168D/8111D Family PCI-E Gigabit Ethernet NIC (NDIS 6.20)
Network Adapter 802.11n Wireless PCI Express Card LAN Adapter |
29 Dec 2011
|
#6 | | |
Or I believe you can use the task scheduler to run the script when it receieves a kernel-power event, Event ID 42 (system is entering sleep state)
Schedule, on an event, Log: system, source: Kernel-Power, Event ID: 42.
I think it should work without complications. | My System Specs | | Computer type PC/Desktop System Manufacturer/Model Number Home built (GeneO industries)/Model 3 OS Windows 7 64 bit SP1 CPU i5 2500k @ 4.5 GHz, 1.264V 124 GFlop (IBT with AVX) Motherboard ASUS P8Z68-V PRO/GEN3 Memory 16GB (4GBx4) 1600MHz G.skill Ripjaws X 8-8-8-24 Graphics Card MSI GTX 660 Ti PE/OC, 2GB 7160 MHz DDR5 clock, 1228 Mhz Core Sound Card Onboard Realtek HD Monitor(s) Displays NEC Spectraview 2490WUXi-SV Screen Resolution 1920 x 1200 Keyboard HP Wireless Mouse HP wireless PSU Seasonic X-850 (2012 KM3 model) Case Fractal Design "Define R3" Cooling CM TPC 812 push/pull, 3 120mm, 2 TY-140 case fans Hard Drives Samsung 128GB 840 Pro SSD (System), Crucial 128GB M4 SSD, 2x WD Caviar 1TB Black internal (data), 1x WD Blue 6Gb/s 1TB Internal, 1x 2TB eSata WD20EARS Green, 2x 500GB Seagate external USB, 1x 350GB exte Internet Speed 27.8 Mb/s down, 5.6 Mb/s up Other Info USB 3.0 x4 , SATA III x4, eSATA x3, SATA II x4, USB 2.0 x8. 2 Samsung DVD R/W drives.
WEI: CPU 7.7, Memory 7.8, Graphics 7.9, Disk 7.9 |
29 Dec 2011
|
#7 | | |
Why not just have the computer go into hibernation? No need for task scheduler or batch scripts that way. And you don't run the risk of shutting down when you should not. Hibernation fully shutdown the computer, it just happens to save the current state on the HDD before it does. | My System Specs | | System Manufacturer/Model Number Alienware Aurora ALX R4 OS Windows 7 x64 (SP1) CPU Intel Core i7-3930K (3.2GHz, Turbo 4GHz) Motherboard Alienware Aurora-R4 x79 Memory 4x Samsung 4GB PC3-12800 DDR3 (16GB 1600MHz) Graphics Card Nvidia Geforce GTX 690 (Stock) Sound Card RealTek Integrated Audio Monitor(s) Displays Dell UltraSharp U3011 Screen Resolution 2560x1600 Other Info Dell Inspiron Mini 10v (Intel Atom N270 1.6 GHz; 1GB; Windows 7 Ultimate) |
30 Dec 2011
|
#8 | | |

Quote: Originally Posted by logicearth Why not just have the computer go into hibernation? No need for task scheduler or batch scripts that way. And you don't run the risk of shutting down when you should not. Hibernation fully shutdown the computer, it just happens to save the current state on the HDD before it does.
Or hybrid sleep mode. Best of both worlds. | My System Specs | | Computer type PC/Desktop System Manufacturer/Model Number Home built (GeneO industries)/Model 3 OS Windows 7 64 bit SP1 CPU i5 2500k @ 4.5 GHz, 1.264V 124 GFlop (IBT with AVX) Motherboard ASUS P8Z68-V PRO/GEN3 Memory 16GB (4GBx4) 1600MHz G.skill Ripjaws X 8-8-8-24 Graphics Card MSI GTX 660 Ti PE/OC, 2GB 7160 MHz DDR5 clock, 1228 Mhz Core Sound Card Onboard Realtek HD Monitor(s) Displays NEC Spectraview 2490WUXi-SV Screen Resolution 1920 x 1200 Keyboard HP Wireless Mouse HP wireless PSU Seasonic X-850 (2012 KM3 model) Case Fractal Design "Define R3" Cooling CM TPC 812 push/pull, 3 120mm, 2 TY-140 case fans Hard Drives Samsung 128GB 840 Pro SSD (System), Crucial 128GB M4 SSD, 2x WD Caviar 1TB Black internal (data), 1x WD Blue 6Gb/s 1TB Internal, 1x 2TB eSata WD20EARS Green, 2x 500GB Seagate external USB, 1x 350GB exte Internet Speed 27.8 Mb/s down, 5.6 Mb/s up Other Info USB 3.0 x4 , SATA III x4, eSATA x3, SATA II x4, USB 2.0 x8. 2 Samsung DVD R/W drives.
WEI: CPU 7.7, Memory 7.8, Graphics 7.9, Disk 7.9 Power Mgmt: Is there a way to Shutdown after idle time period? problems? All times are GMT -5. The time now is 06:46 AM. | |