NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 177 178 179 180 181 … 433 Next »
Is there a way to stop, start recording service in batch script?

Is there a way to stop, start recording service in batch script?
sfatula
Offline

Junior Member

Posts: 45
Threads: 15
Joined: Nov 2014
#1
2015-07-29, 06:19 PM
I would want to do so, if possible, from PostUpdateEPG.bat script. I embedded this but it does not work:

net stop "NPVR Recording Service"
net start "NPVR Recording Service"

Not really a Windows guy, but, wanting to restart it each morning as I have found it hanging sometimes.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,199
Threads: 958
Joined: May 2006
#2
2015-07-29, 09:29 PM
sfatula Wrote:I would want to do so, if possible, from PostUpdateEPG.bat script. I embedded this but it does not work:

net stop "NPVR Recording Service"
net start "NPVR Recording Service"

Not really a Windows guy, but, wanting to restart it each morning as I have found it hanging sometimes.

That is the command UAC permitting and assuming NRecord is running as local system. Not sure if you can stop the service from within the service and if does that probably kills the batch file thread so the net start might fail. Scheduling a restart make more sense to me especially if the hang is driver related.

Martin
sfatula
Offline

Junior Member

Posts: 45
Threads: 15
Joined: Nov 2014
#3
2015-07-29, 09:32 PM
I presume then there is some mechanism to restart, as opposed to stop and start, the service as the system user? If so, how to restart it, what command. Or, might stop and start be better?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,199
Threads: 958
Joined: May 2006
#4
2015-07-29, 09:34 PM
I meant restart the PC.

Martin
sfatula
Offline

Junior Member

Posts: 45
Threads: 15
Joined: Nov 2014
#5
2015-07-29, 09:42 PM
I see, did not want to do that as many other things run there. Thus far, every time a manual service restart using the link provided in the install to restart npvr service has resolved the issue. Hopefully, someone can help with my other post detailing the lock and the logs I attached.
HarryH3
Offline

Posting Freak

U.S.A
Posts: 925
Threads: 56
Joined: Mar 2006
#6
2015-07-29, 11:33 PM
I used to have a problem with the service hanging sometimes. Needless to say, the WAF went WAY down when her shows didn't get recorded. Someone posted this PostEPGUpdate script that reboots the system after the nightly EPG run and we haven't had the problem since I added it to our HTPC:

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
sleep 60
goto check

:reboot

echo "About to reboot"
shutdown /r
i3-3570k, 8GB RAM, Win10 Pro, Nvidia GT710, HDHomeRun (OTA), NPVR 6.x
On a clear disk, you can seek forever...
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#7
2015-07-30, 03:02 AM
You may want to look into Windows Scheduler to accomplish this. I see two options:
1 - Create a scheduled task to run a batch file that stops then starts the service
2 - Create two scheduled tasks, one to stop the service, the other to start it.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Recording movies / TV to XBMC directory stucture spinnaker 10 3,810 2024-06-03, 03:56 AM
Last Post: Rod Hutchinson
  Not recording errors vidwiz 4 1,144 2024-04-17, 05:39 PM
Last Post: mvallevand
  Add Series/Episode Info to Recording Metadata andrewj 2 1,196 2023-11-20, 03:42 PM
Last Post: sub
  Recording to a network drive woes. 2leftfeet 12 7,557 2022-04-05, 08:03 PM
Last Post: mvallevand
  All my recordings start 90 sec early ncsercs 2 1,455 2022-03-19, 03:28 AM
Last Post: sub
  device needed for recording David209 2 1,824 2021-04-04, 08:47 AM
Last Post: David209
  PC not going to sleep after recording LeoL 7 3,529 2021-04-01, 07:17 PM
Last Post: Handy.Man
  HDHomerun recording bizzarely not working Jean0987654321 3 2,177 2021-03-27, 03:23 PM
Last Post: Jean0987654321
Video Restrict Recording Space foucomm 1 1,407 2021-01-30, 09:25 PM
Last Post: mvallevand
  Directory dropdown on the recording edit dialog MicahMakenzie 1 1,582 2021-01-11, 04:37 PM
Last Post: Graham

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode