Database.ca SQL Server Blog

My Blog

Wednesday, January 01 2014

Keywords: PC, computer, wakes up, waking up, at night, scheduled tasks, windows 8, windows 8, windows server 2008 R2, windows server 2012 R2, Windows turns on automatically

Why does my computer wake up from sleep in the middle of the night? It's bothersome!

This is not a database related article...but I thought I'd address it anyways especially since I have had to "fix" this at my own home and at least 3 other family members'...all having Windows 8.1 installed.

 

It's regarding those computers that wake up by themselves every night...like a ghost...and are bothersome to your healthy sleep patterns if placed close enough to your bed or bedroom. I have also heard concerns such as computers turning on while the owner was on vacation...computer over-heating during summer time...and even an elderly who voiced her concerns about wasting electricity over the night...all of the above complaints are valid of course.
 
 
If you are really curious, you could find out the actual cause of your PC's very last wake up...by launching Command Prompt, and typing powercfg /lastwake.
 
PC, computer, wakes up, waking up, at night, scheduled tasks, windows 8, windows 8, windows server 2008 R2, windows server 2012 R2, Windows turns on automatically

 

There are a handful of things out there that can wake up a computer that is asleep, most popular amongst which being:
 

  • Mouse moved...even slightly...accidentally or intentionally
  • A key stroke on the keyboard (I have even seen an unintentional case where a book fell on the keyboard and woke the PC up)
  • Scheduled Tasks (The use of this tool is gaining popularity and going forward as of Windows 8 this is most probably the culprit)

 

PC, computer, wakes up, waking up, at night, scheduled tasks, windows 8, windows 8, windows server 2008 R2, windows server 2012 R2, Windows turns on automatically

Case #1: Waking up the computer with mouse move:
 
1) Launch "Device Manager". Depending on your OS there are various ways to do it..One new way on Windows 8 would be by typing WindowsKey-X and then selecting "Device Manager" from the pop up menu list. The Windows Key is a new key found on the keyboards that ship with Windows 8+ ... and is usually found close to Alt and Fn keys.

 

PC, computer, wakes up, waking up, at night, scheduled tasks, windows 8, windows 8, windows server 2008 R2, windows server 2012 R2, Windows turns on automatically

2) Once in Device Manager...Find your mouse...usually under "Mice and other pointing devices"...Right-click on it and select properties.

 

PC, computer, wakes up, waking up, at night, scheduled tasks, windows 8, windows 8, windows server 2008 R2, windows server 2012 R2, Windows turns on automatically

3) Under "Power Management" table, you would be able to turn this option off/on.

 

PC, computer, wakes up, waking up, at night, scheduled tasks, windows 8, windows 8, windows server 2008 R2, windows server 2012 R2, Windows turns on automatically

Case #2: Waking up the computer with a key stroke:
 
Follow the exact steps as for Mouse...except that you would need to find your keyboard under "Keyboards" in Device Manager.
 
PC, computer, wakes up, waking up, at night, scheduled tasks, windows 8, windows 8, windows server 2008 R2, windows server 2012 R2, Windows turns on automatically

 

PC, computer, wakes up, waking up, at night, scheduled tasks, windows 8, windows 8, windows server 2008 R2, windows server 2012 R2, Windows turns on automatically

Case #3: And the usual suspect when the PC wakes up every single night, night after night is: Scheduled Tasks
 
1) Launch Windows Task Scheduler...depending on your flavor of Windows this app could be called slightly different. In Windows 8 it could be found by typing "Schedule Tasks" in Start menu.
 

 

PC, computer, wakes up, waking up, at night, scheduled tasks, windows 8, windows 8, windows server 2008 R2, windows server 2012 R2, Windows turns on automatically

2) In every folder and sub-folder on the left pane, you could find zero to many tasks. Some tasks are enabled, and some are showing but are disabled or not scheduled at all. However I recommend that on your own personal PC, you would take five minutes (that's all it takes) and go through every single sub-folder under "Windows" (at first it looks like a long list)...and get to know your PC better...it is important that for each and every single task you view it's Condition tab...to verify whether "Wake the computer to run this task" is checked or not.

 

PC, computer, wakes up, waking up, at night, scheduled tasks, windows 8, windows 8, windows server 2008 R2, windows server 2012 R2, Windows turns on automatically

3) I recommend that you do not disable most these tasks that wake the computer up at night...by the way you could disable a task by simply right-clicking on it and selecting 'disable'...instead simply uncheck the 'wake up the computer' option...and configure the task to run only if the computer is idle for more than 10 minutes etc. The latter option is found under "Conditions" tab as well.

 

PC, computer, wakes up, waking up, at night, scheduled tasks, windows 8, windows 8, windows server 2008 R2, windows server 2012 R2, Windows turns on automatically

Written by Ramin Haghighat