Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Ability To Run Scripts When UPS State Is Changing #39

Closed
FileCity opened this issue Sep 28, 2020 · 4 comments
Closed

Ability To Run Scripts When UPS State Is Changing #39

FileCity opened this issue Sep 28, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@FileCity
Copy link

FileCity commented Sep 28, 2020

It should be a good idea, on a future release, to add the ability to run scripts when the UPS state is changing.
On battery = Script1.script
Back Online = Script2.script
With this we would be able to stop power hungry processes to save the batteries and resume them when the utility power returns. This is possible on Linux and it's part of the NUT package.
This can be added from inside WinNUT-Client application or triggered from a system event with the Task Scheduler ( this approach is more easier to integrate at first). Actually WinNUT-client is not registering any system events when the UPS state is changing so it's not possible for now.

Thanks.

@gawindx gawindx added the enhancement New feature or request label Sep 29, 2020
@gawindx
Copy link
Owner

gawindx commented Sep 29, 2020

it was already planned in one side of my head, but I think it won't be for now.
I consider it a comfort (at least for now) and other modification seems more urgent to me.

In addition, adding this feature would not necessarily be in line with the changes that await me and could complicate my task.

But yes, it was planned.

@FileCity
Copy link
Author

@gawindx, no problem. It can be a nice feature to stop some services, like GPU computations, while on battery.
I fully understand your point and it's always better to add and debug features incrementally than all at once...

@sw90036
Copy link

sw90036 commented Jun 11, 2023

I am running the NUT Server on a Synology NAS so I don't have any options to run processes from the server. I have a set of PowerShell scripts (which I will be happy to contribute) that I would like to run at various points while the UPS is on battery so I am looking forward to seeing this! THANK YOU for your efforts on this!

@gbakeman
Copy link
Contributor

Everyone,

This repository is abandoned and no longer developed. I've reopened this issue at the current repository, here . Please close this current issue if possible and subscribe/participate in the one I linked.

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

No branches or pull requests

4 participants