Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there some way to prevent Windows going to standby while backup jobs are running? #63

Open
TimH54 opened this issue Mar 14, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@TimH54
Copy link

TimH54 commented Mar 14, 2022

I have had my machine going to standby while a backup job was running. It got interrupted. Is there some way for the scripts to prevent standby while the job is still running?

@demlak
Copy link

demlak commented May 29, 2022

I am absolutly not familiar with windows-things.. i just start to dig into restic on windows..
but maybe this helps?
https://winsourcecode.blogspot.com/2020/05/keepdisplayon-runs-program-preventing.html

@kmwoley kmwoley added the enhancement New feature or request label Jan 15, 2023
@kmwoley
Copy link
Owner

kmwoley commented Jan 15, 2023

Personally, this isn't behavior that I would want, but I can understand why you may want it.
There was a feature request a while back to add the ability to run some pre- and post- backup actions to the script.
If you found a way to tell Windows not to go to sleep in one script, and tell it that it's okay to go to sleep via another script, and then you could just call those two scripts from the backup, would that help you achieve your goal?

@fetzerch
Copy link

MS Powertoys contains a tool that could be used for this: https://learn.microsoft.com/en-us/windows/powertoys/awake#command-line-interface-cli.

The implementation pretty much does the same that has been linked above (Win32 SetThreadExecutionState API).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants