Bill-Stewart / SyncthingWindowsSetup

Syncthing Windows Setup
Mozilla Public License 2.0
1.26k stars 54 forks source link

Ensure task starts if laptop is running on battery #26

Closed duncansmart closed 7 months ago

duncansmart commented 7 months ago

By default Task Scheduler tasks created though the COM API have the "Start the task only if the computer is on AC Power" checked.

Bill-Stewart commented 7 months ago

I'm not sure we really want to make that a default, but it's probably a good idea to mention it in the docs.

duncansmart commented 7 months ago

Well I definitely found it surprising that my files weren't syncing the other day. Dropbox etc don't stop working when you're not on AC power.

Bill-Stewart commented 7 months ago

The consequences need to be considered. Perhaps it might make sense to allow this as a configurable advanced option using a command line argument.

Bill-Stewart commented 7 months ago

Thanks for bringing this up. If installed per-machine and the service is set to automatic startup, the service will start even if the computer is running on battery; changing this default aligns with the service. The only caveat is that it won't change existing per-user installs that use automatic startup. We'll have to accept this and document it.

duncansmart commented 7 months ago

I think you're overthinking it. People expect Syncthing to be running continually but, seemingly randomly, it won't be because they logged-out/back in again whilst in a coffee shop or something. I thought Syncthing had crashed: which reflects badly on Syncthing because it has never crashed in the many years I've used it.

Bill-Stewart commented 7 months ago

The "Start only on AC power" is now an option on the Additional Tasks wizard page that is deselected by default. Thanks for the suggestion!