How do I set-up these tasks in TASK SCHEDULER?

From 12:01pm-3:59am once every 6 days I want my PC to change what shutdown does. Pretty much in that time-frame if I shutdown my PC I want it to instead go into hybrid sleep mode. I then want it to stay in hybrid sleep mode unless I shutdown the PC after this time-frame.

Now the reason for this is I want my PC to run a task that will only work if the PC is in hybrid sleep mode. I will have the task detect if the PC is in hybrid sleep mode and if it is, it will run this task. If the PC is not in hybrid sleep mode (lets say I chose to instead leave my PC on all night or I turned the PC back on and left it on all night) then the task will NOT run.


Monday 7pm I shutdown my PC instead it goes into hybrid sleep mode.
Tuesday at 4am my PC wakes up and runs the Disk Defrag task.
Tuesday at 5am the task finishes and I have it set to shutdown once Defrag completes.
The PC SHUTS DOWN (not hybrid sleeps)

Hybrid sleep info:

Hi Radical,

Welcome to Microsoft Community and thanks for posting the question.


Based on the description it looks like you want to create an auto task for system.

Windows Power Button values are stored at: HKU\SID\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_PowerButtonAction.

Note: You may have to create a script to change it.

Note: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry
incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry
if a problem occurs. For more information about how to back up and restore the registry, refer the following link:

If you need any other information about Windows, feel free to post your questions and we will be glad to help.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.


Question Info

Last updated March 15, 2018 Views 107 Applies to: