Results 1 to 7 of 7

Thread: TV Listings Update with Task Scheduler issue windows 10

  1. #1
    Join Date
    Jun 2017
    Location
    United States
    Posts
    3

    Question TV Listings Update with Task Scheduler issue windows 10

    Ok, I've banged my head against this long enough.

    I'm using zap2xml and I have a UpdateEPG.bat in the scripts directory. I can run the batch file, then open the nextPVR settings and click "update EPG" and the EPG will update as long as I do this manually every few days. I've set up a task in task scheduler to run the batch file every night at midnight and as far as I can tell the <expletive> thing has never run. The xml files do not show updated modified dates.

    I'm sure this is a common issue you've all seen and the issue is plain as day, but as someone who rarely uses task scheduler I'm baffled. Cron works great in linux but this darn thing doesn't seem to work even though it's wizard based. I've followed the examples I can find googling "run a batch file from task scheduler" and they don't produce a working result.

    What am I missing here? Seriously just running the batch file should update the guide. Why do I need to open the settings and run the update there as well? I should note that just running "update EPG" from the settings does not update the files even though it says it's running the batch file.

    NextPVR is working great other than this issue with the EPG. What is wrong?
    Last edited by darkkaplah; 2017-06-05 at 05:17 AM.

  2. #2
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    89,166
    (I moved this thread, because I don't think you're asking about the "TVListings" plugin (which is an alternative to the built in "TV Guide" screen), but are rather asking about getting the tv listing data into NextPVR...)

    If you have an UpdateEPG.bat file in the NextPVR scripts directory, then NextPVR will try to run it each night before it does the EPG update. You don't need to set this up in the windows task scheduler or anything like that. If you don't think NextPVR has been automatically running it, zip and attach your logs and I'll check.

    From past experience though, NextPVR is almost certainly attempting to run your batch file, but you've probably got some bug in it that stops it working correctly. There is a couple of minor things different when NextPVR runs the script overnight, which typically trip people up. (1) the default directory is different (so you're best to explicitly change directories at the start of your batch file to the directory you expect it to be in), and (2) the recording service runs the batch file as the 'localsystem' account (rather than your normal desktop account, so you could have zap2xml failing to find some config file etc)

  3. #3
    Join Date
    May 2006
    Location
    Canada
    Posts
    27,731
    If you can't update from NextPVR settings that typically is the batch file not permissions. However zap2xml does depend on user setup in the "home" directory so permissions could also be bad for the daily update too.

    You can save yourself the frustration by spending a cup of coffee a month on Schedules Direct data.

    Martin

  4. #4
    Join Date
    Jun 2017
    Location
    United States
    Posts
    3
    After about giving up on NextPVR due to it's inability to read the schedules without a schedulesdirect subscription I finally found the right answer in a newer forum post. Turns out that all I needed to do was configure a windows task scheduler to do the following:

    C:\Program Files (x86)\NPVR\NextPVR.exe -updateepg

    Seriously this needs to be in the manual. My Updateepg.bat was correctly configured. This step would SOLVE the problem many of us on here have with NextPVR. It seems like an obvious solution to those who use this application constantly, but to people like me this is non-obvious.

  5. #5
    Join Date
    May 2006
    Location
    Canada
    Posts
    27,731
    I figure most people would prefer to solve the problem properly by using the correct permissions and options in their batch file rather then making things more complex. The simplest way is changing the recording services to run with your user credentials since that is how zap2xml is designed to work.

    Martin
    Last edited by mvallevand; 2017-07-06 at 06:02 PM.

  6. #6
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    89,166
    Quote Originally Posted by darkkaplah View Post
    After about giving up on NextPVR due to it's inability to read the schedules without a schedulesdirect subscription I finally found the right answer in a newer forum post. Turns out that all I needed to do was configure a windows task scheduler to do the following:

    C:\Program Files (x86)\NPVR\NextPVR.exe -updateepg

    Seriously this needs to be in the manual. My Updateepg.bat was correctly configured. This step would SOLVE the problem many of us on here have with NextPVR. It seems like an obvious solution to those who use this application constantly, but to people like me this is non-obvious.
    Glad you got it sorted. It is mentioned in the documentation here: http://www.nextpvr.com/nwiki/pmwiki....andLineOptions

  7. #7
    Join Date
    Jul 2018
    Location
    USA
    Posts
    28
    I know this post is over a year old, but in case someone finds this thread looking for how to run the UpdateEPG.bat file in Windows Task Scheduler (or any other bat file for that matter), I thought I would provide the solution.

    For some reason Windows Task Scheduler cannot run any bat file directly from the "Program/script" field in a task. Putting the path to any bat file here will ALWAYS fail.

    What you have to do is put "cmd" (without quotes) in that box. This tells windows to open a command prompt window. Then in the "Add arguments (optional)" field add the following line:
    Code:
    /c start "UpdateEPG" /min "C:\Users\Public\NPVR\Scripts\UpdateEPG.bat"
    In that line the "UpdateEPG" is what will be displayed in the Title of the command prompt box, the "/min" tells it to start minimized, then you have the path to the bat file.

    Finally since we want to make sure the output file is in the same directory, add the path to the bat file without the bat file name to the "Start in (optional)" field.
    Your "Edit Action Screen should end up looking like the attachment. That will allow you to run bat files from Windows Task Scheduler.

    One final tip, if you want the window to auto close when finished add the word "Exit" (without quotes) as the very last line of the bat file itself.
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •