HI!
I'm setting up a Windows Scheduled Task to wake up my computer in the middle of the night and perform a batch backup, I would like the computer to go back to sleep so when saving the batch i checked the "Shut down (Sleep)"-option.
When testing this a couple of times my computer keeps jumping in to sleep mode and I figured a nice feature would be to show a propt "Computer will go to sleep in 20 s" or something so that I can abort this if I'm actually using the computer in the middle of the night.
Scheduled batch that puts the computer to sleep
- Posts: 1
- Joined: 29 Jan 2022
- Posts: 2451
- Joined: 22 Aug 2012
Try entering your own suitable user defined shutdown command in the "Run a command" box in the Synchronization Settings (F8).
- Posts: 4056
- Joined: 11 Jun 2019
You would need to use a script that detects user interaction and doesn't run the sleep command if there is any. Start with finding out how to write or find a script that can detect user presence before acting.
- Posts: 4056
- Joined: 11 Jun 2019
cmd doesn't really have a good way to go to sleep and allow it to be interrupted.
Nvm, this is easy
Run a CHOICE cmd that defaults to yes after 20 seconds, and set it so choosing no aborts the script instead of continuing and running a command to go to sleep.
Nvm, this is easy
Run a CHOICE cmd that defaults to yes after 20 seconds, and set it so choosing no aborts the script instead of continuing and running a command to go to sleep.