2016-09-27, 10:33 AM
HarryH3 Wrote:I don't recall what thread I found it in, or who wrote it, but it runs every night just fine for me.Yoa are not running comskip after recordings? I noticed that your script is not looking for any comskip process running before it reboots...PostUpdateEPG.bat, from the Scripts directory located at C:\Users\Public\NPVR\Scripts
Code:echo off
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
timeout 60
goto check
:reboot
echo "About to reboot"
shutdown /r
Just be aware that this script runs EVERY time the EPG is updated, so if you are testing and click "Update EPG" in the settings screen, then the EPG will update and then your server will reboot. :eek: I have my EPG update set to run at something like 4:17 AM.
"I'd rather have a bottle in front of me than a frontal lobotomy"