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