Problem with upssched in the Windows NUT build 2.8.5 - NUT-for-Windows-x86_64-RELEASE-2.8.5-1-fixNSS
In my scenario, I only need to poll a remote UPS and, on some Windows clients, decide when to shut down not based on FSD, but earlier than that. I chose to use upssched and its timers.
Upsmon starts upssched.exe on configured events, but the process cannot create PIPEFN and LOCKFN. Without these parameters, upssched.exe does not start at all. I tried different options, but in every case, at the very first NOTIFYFLAG state change, multiple instances of upssched.exe are launched — more than 10–20 or so — and they start the same timers in parallel and run the same file logging operations. At the same time, no working flags are created. For testing, I ran upsmon in the console; at the first state change, the console showed a message saying it was unable to establish communication with already running instances, along with many duplicated messages about launching my script from CMDSCRIPT.
c:\NUT\sbin>upsmon.exe
Network UPS Tools upsmon 2.8.5 release using a dynamic libnutprivate*
UPS: [testups@192.168.1.1](mailto:testups@192.168.1.1) (secondary) (power value 1)
Using power down flag file C:\NUT\killpower
Init SSL without certificate database
read confirmation got []
read confirmation got []
read confirmation got []
read confirmation got []
read confirmation got []
Unable to connect to daemon and unable to start daemon
messages from my log file:
[2026-07-13 12:05:04.070] PID=21392 EVENT=online_returned Entered handler
[2026-07-13 12:05:04.086] PID=21392 EVENT=online_returned Power returned, no shutdown marker present
[2026-07-13 12:05:04.094] PID=12528 EVENT=online_returned Entered handler
[2026-07-13 12:05:04.110] PID=12528 EVENT=online_returned Power returned, no shutdown marker present
[2026-07-13 12:05:04.118] PID=19696 EVENT=online_returned Entered handler
[2026-07-13 12:05:04.134] PID=19696 EVENT=online_returned Power returned, no shutdown marker present
[2026-07-13 12:05:04.140] PID=5900 EVENT=online_returned Entered handler
[2026-07-13 12:05:04.156] PID=5900 EVENT=online_returned Power returned, no shutdown marker present
[2026-07-13 12:05:04.166] PID=23924 EVENT=online_returned Entered handler
[2026-07-13 12:05:04.182] PID=23924 EVENT=online_returned Power returned, no shutdown marker present
[2026-07-13 12:05:04.254] PID=27780 EVENT=online_returned Entered handler
[2026-07-13 12:05:04.268] PID=27780 EVENT=online_returned Power returned, no shutdown marker present
[2026-07-13 12:05:04.320] PID=17404 EVENT=online_returned Entered handler
....
[2026-07-13 12:08:04.990] PID=20552 EVENT=online_returned Entered handler
[2026-07-13 12:08:05.006] PID=20552 EVENT=online_returned Power returned, no shutdown marker present
[2026-07-13 12:08:05.006] PID=19216 EVENT=online_returned Entered handler
[2026-07-13 12:08:05.037] PID=19216 EVENT=online_returned Power returned, no shutdown marker present
[2026-07-13 12:08:05.053] PID=3096 EVENT=online_returned Entered handler
[2026-07-13 12:08:05.085] PID=3096 EVENT=online_returned Power returned, no shutdown marker present
[2026-07-13 12:08:05.085] PID=7720 EVENT=online_returned Entered handler
[2026-07-13 12:08:05.101] PID=7720 EVENT=online_returned Power returned, no shutdown marker present
#upssched.conf
CMDSCRIPT "C:\NUT\cmd\upssched-cmd.cmd"
#PIPEFN "C:\\NUT\\upssched.pipe"
#LOCKFN "C:\\NUT\\upssched.lock"
#PIPEFN "C:\NUT\upssched.pipe"
#LOCKFN "C:\NUT\upssched.lock"
#PIPEFN "C:/NUT/upssched.pipe"
#LOCKFN "C:/NUT/upssched.lock"
#PIPEFN "/NUT/upssched.pipe"
#LOCKFN "/NUT/upssched.lock"
PIPEFN "\\.\pipe\upssched"
LOCKFN "C:\NUT\upssched.lock"
AT ONBATT * START-TIMER onbatt_shutdown 120
AT ONLINE * CANCEL-TIMER onbatt_shutdown online_returned
AT LOWBATT * EXECUTE lowbatt_shutdown
#upsmon.conf
MONITOR [testups@192.168.1.1](mailto:testups@192.168.1.1) 1 user user secondary
MINSUPPLIES 1
SHUTDOWNCMD "C:\Windows\System32\shutdown.exe /s /t 0 /f"
POLLFREQ 15
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
FINALDELAY 5
POWERDOWNFLAG "C:\NUT\killpower"
NOTIFYCMD "C:\NUT\sbin\upssched.exe"
NOTIFYFLAG ONLINE EXEC
NOTIFYFLAG ONBATT EXEC
Problem with upssched in the Windows NUT build 2.8.5 - NUT-for-Windows-x86_64-RELEASE-2.8.5-1-fixNSS
In my scenario, I only need to poll a remote UPS and, on some Windows clients, decide when to shut down not based on FSD, but earlier than that. I chose to use upssched and its timers.
Upsmon starts upssched.exe on configured events, but the process cannot create PIPEFN and LOCKFN. Without these parameters, upssched.exe does not start at all. I tried different options, but in every case, at the very first NOTIFYFLAG state change, multiple instances of upssched.exe are launched — more than 10–20 or so — and they start the same timers in parallel and run the same file logging operations. At the same time, no working flags are created. For testing, I ran upsmon in the console; at the first state change, the console showed a message saying it was unable to establish communication with already running instances, along with many duplicated messages about launching my script from CMDSCRIPT.
messages from my log file: