Hi, I have problem with upssched on windows. Upssched is not executed. I have 2 scripts, 1 for notification in upsmon and second for scheduling in upssched. Monitoring is working fine, script write to log. I'm using binary windows installer 2.6.5-6 from NUT.
Here are my configs: --- nut.conf MODE=netclient --- upsmon.conf MONITOR [email protected] 1 <user> <password> slave MINSUPPLIES 1 SHUTDOWNCMD "C:\\WINDOWS\\system32\\shutdown.exe /t 600 /s /d u:6:11" NOTIFYCMD C:\\NUT\\notify.cmd POLLFREQ 5 POLLFREQALERT 5 HOSTSYNC 15 DEADTIME 15 POWERDOWNFLAG C:\\NUT\\killpower NOTIFYMSG ONLINE "UPS %s on line power" NOTIFYMSG ONBATT "UPS %s on battery" NOTIFYMSG LOWBATT "UPS %s battery is low" NOTIFYMSG FSD "UPS %s: forced shutdown in progress" NOTIFYMSG COMMOK "Communications with UPS %s established" NOTIFYMSG COMMBAD "Communications with UPS %s lost" NOTIFYMSG SHUTDOWN "Auto logout and shutdown proceeding" NOTIFYMSG REPLBATT "UPS %s battery needs to be replaced" NOTIFYMSG NOCOMM "UPS %s is unavailable" NOTIFYMSG NOPARENT "upsmon parent process died - shutdown impossible" NOTIFYFLAG ONLINE SYSLOG+EXEC NOTIFYFLAG ONBATT SYSLOG+EXEC NOTIFYFLAG LOWBATT SYSLOG+EXEC NOTIFYFLAG FSD SYSLOG+EXEC NOTIFYFLAG COMMOK SYSLOG+EXEC NOTIFYFLAG COMMBAD SYSLOG+EXEC NOTIFYFLAG SHUTDOWN SYSLOG+EXEC NOTIFYFLAG REPLBATT SYSLOG+EXEC NOTIFYFLAG NOCOMM SYSLOG+EXEC NOTIFYFLAG NOPARENT SYSLOG+EXEC RBWARNTIME 43200 NOCOMMWARNTIME 300 FINALDELAY 5 --- upssched.conf CMDSCRIPT "cmd.exe /C C:\\NUT\\sched.cmd" PIPEFN "C:\\NUT\\upssched.pipe" LOCKFN "C:\\NUT\\upssched.lock" AT ONBATT * EXECUTE onbattnow AT ONBATT * START-TIMER onbattwarn 30 AT ONLINE * EXECUTE ups-back-on-line AT ONLINE * CANCEL-TIMER onbattwarn --- notify.cmd @ECHO OFF For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%b.%%a.%%c) For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a:%%b) echo [%mydate%-%mytime%] %1 %2 %3 %4 >> C:\\NUT\\notify.log --- output in notify.log [10.03.2020-10:56 AM] "UPS [email protected] on battery" [10.03.2020-11:00 AM] C:\NUT\notify.cmd "UPS [email protected] on line power" [10.03.2020-11:15 AM] "UPS [email protected] battery is low" [10.03.2020-12:23 PM] "UPS [email protected] on battery" [10.03.2020-12:24 PM] "UPS [email protected]: forced shutdown in progress" [10.03.2020-12:24 PM] "Auto logout and shutdown proceeding" [10.03.2020-12:25 PM] "Communications with UPS [email protected] lost" [10.03.2020-12:25 PM] "UPS [email protected] is unavailable" [10.03.2020-12:30 PM] "UPS [email protected] is unavailable" [10.03.2020-12:35 PM] "UPS [email protected] is unavailable" [10.03.2020-12:40 PM] "UPS [email protected] is unavailable" [10.03.2020-12:45 PM] "UPS [email protected] is unavailable" [10.03.2020-12:49 PM] "UPS [email protected] battery is low" [10.03.2020-12:55 PM] "Communications with UPS [email protected] lost" [10.03.2020-12:55 PM] "Communications with UPS [email protected] established" [10.03.2020-01:04 PM] "UPS [email protected] battery is low" --- sched.cmd @ECHO OFF For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%b.%%a.%%c) For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a:%%b) echo [%mydate%-%mytime%] %1 %2 >> C:\\NUT\\sched.log Script sched.cmd is never executed, and I can't instruct windows client to early shut down. Any help ? Thanks. ________________________________ s pozdravom Radoslav Chovan
_______________________________________________ Nut-upsuser mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
