Windows – Schedule Windows 10 Sleep and Wake

sleepwake-upwindows 10windows task scheduler

I have a Windows 10 Home Edition tablet (2 in 1 actually) and I want to use the tablet part as a display for an IP camera. This means I need it on and power connected all through the day but not at night. For this task, I want to schedule it to go to sleep at lets say 11 PM and wake up at 7 AM.

Is there any way to accomplish this, maybe using Task Scheduler?

Edit: I got Sleep to work with the answer here: Use Windows Task Scheduler To Put Windows To Sleep Without Batch File however I still need to find out how to wake at a given time.

Best Answer

Unfortunately, there's no way to create a scheduled task that just wakes the computer up. The only non-deprecated action a scheduled task can perform is running a program/script.

However, like in many cases, there's a workaround. You can configure a scheduled task to wake the computer up to perform the task. If the action is, for example, "open a cmd an immediately close it", a scheduled task can wake the computer up at a specific time.

It sounds as if you already know how to create a scheduled task, so I'll just skip to the interesting parts.

After configuring what time and how frequently you want the task to run, the action you want to add is "start a program". Under "Program/script", write "/c exit". This is a simple command that will end cmd/powershell sessions.

Open the scheduled task's properties. In the "general" tab, mark "Run whether user is logged on or not", for obvious reasons.

Now all that's left is to make the scheduled task wake the computer up if need be. In the properties, and under "conditions" mark "wake the computer to run this task". You might also want to remove the mark on "Start the task only if the computer is on AC power", if you're using a laptop. There's no need to give the task any special privileges.

And there you go - a new scheduled task that wakes the computer up whenever you want.