2020-04-09, 02:11 PM
I wrote the batch file below many years ago to go in the postUpdateEPG.bat to reboot the server when it is not recording. It does not work in V5 so assumed it was just a case of changing the file location in the "set" statement but nscripthelper is now a dll file and it fails with Unhandled Exception. Is it possible to get this script working under V5?
Chris
********************************************************
REM Reboot if not recording
set NSHelper=c:\"program files (x86)"\npvr\nscripthelper.exe
:check
FOR /F "tokens=*" %%i in ('%NSHelper% -isinuse') do SET condition=%%i
echo %condition%
IF %condition% =="NOT RECORDING" goto reboot
:delay
sleep 60
goto check
:reboot
echo "About to reboot"
shutdown /r
Chris
********************************************************
REM Reboot if not recording
set NSHelper=c:\"program files (x86)"\npvr\nscripthelper.exe
:check
FOR /F "tokens=*" %%i in ('%NSHelper% -isinuse') do SET condition=%%i
echo %condition%
IF %condition% =="NOT RECORDING" goto reboot
:delay
sleep 60
goto check
:reboot
echo "About to reboot"
shutdown /r
NextPVR Server - HP N54L Microserver, Windows 10 - Storage 2 X 3TB - Tuners DVBSky S952 Twin DVB-S/S2 PCIe, Hauppauge Twin DVB-T2 USB, Telestar Digibit R1 Sat>IP Server.
Clients:- 2 X RPi3, 1 X RPi4 and Acer RL80 Celeron Nettop all running NextPVR New Client on LibreElec.
Clients:- 2 X RPi3, 1 X RPi4 and Acer RL80 Celeron Nettop all running NextPVR New Client on LibreElec.