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

keep windows from entering standby/hibernation during transfers #13

Open
klaernie opened this issue Jul 20, 2023 · 0 comments
Open

keep windows from entering standby/hibernation during transfers #13

klaernie opened this issue Jul 20, 2023 · 0 comments

Comments

@klaernie
Copy link

First of all: thanks for packaging rsync ready to use, makes my life much easier.

I am running rsync on the family PCs around, but some long backups abort since the PCs enter sleep before completing the backup. So I was wondering if there is a way to keep windows from entering standby or hibernation while transfers are happening.

Looking around I found the cygwin nosleep package, which uses Windows' API to set the power requirements for the thread (https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate).

According to Microsoft's documentation:

To run properly on a power-managed computer, applications such as fax servers, answering machines, backup agents, and network management applications must use both ES_SYSTEM_REQUIRED and ES_CONTINUOUS when they process events.

Would you think this could be patched into rsync, so that it prevents the PC from sleeping while a client is connected?

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

No branches or pull requests

1 participant