I put my Windows 7 desktop to sleep when it's unused. I noticed that it wakes up around the same time every night. How can I identify the cause?
Not sure about 7, but on Vista you'd do Windows button -> Control Panel -> Administrative Tools -> Task Scheduler.
In Task Scheduler, click on "Task Scheduler Library" in the left-hand column, an in the top center column you will see a list of scheduled tasks. Eg, there's apt to be one for Adobe Flash update, Google Update, etc.
For each suspicious task, highlight it and select "Properties" in the right-hand column. Examine the data in the "Triggers" tab to see when the task is scheduled to run. To prevent it from waking the computer, select the "Conditions" tab and, under "Power", deselect "Wake the computer to run this".
(While you're at it, take advantage of the opportunity to disable or completely delete some of the silly tasks, such as ones that update rarely-used tools twice a day.)
There could be multiple things that could cause this. For starters check the following
- Go into your computer's BIOS as @OmarAsifShaikh suggests go to power setting/power config/Power Management depending on your computers' bios manufacturer. There should be setting called "Wake on Alarm", check to see if it is enabled. This wakes the computer on a set interval.
- There are other settings like Power on by Mouse, Power on by Keyboard etc. A pet, a prankster roomie, or something could potentially trigger a mousemove/click, keypress to wake-up that computer if any of these settings are enabled.
- Wake on Lan could be activated for your ethernet card. Go to your ethernet card's properties, power settings and see if "allow this device to wake up this computer" is checked. If it is then something on your network could be sending the WOL magic packet (no pun intended) to power up your PC via the ethernet device.
- Lastly, highly unlikely but a bad BIOS may cause abrupt power cycling, if none of the above is proven to be the case check if the bios/bios battery is in good shape.
Open command prompt, and use the following command
It should tell you what hardware device caused the computer to wake up.
As to why the device woke up the computer, there could be many reasons, some of which are detailed in IUnknown's answer
There is usually some kind of update being done, either Windows or some other apps. Also some apps run in the background all the time, but there is also a chance that it could be a virus, or malware. If it is constantly going on and off, then it is usually malware. Try using Malwarebytes.org, there is a free scan. It works better than any other scan I have ever used. Your security updates, and Windows, but it should only stay awake for a short time, unless there is a huge update for Windows.