Skip to content

keep windows from entering standby/hibernation during transfers #13

Description

@klaernie

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions