How to get XMLTV to run in the background automatically
How to get XMLTV to run in the background automatically
Hi was wondering if you could give me some help. Am a complete newbie and have a copy of Showshifter ver 3.01.2557 and your grabber version 2.9 W
I have managed to get the grabber to collect listings that i want and then to get showshifter to import using a bat file generated by XMLTV. See below.
"C:\Program Files\XMLTV Radio Times\xmltvrt.exe" /Grab
"C:\Program Files\Home Media Networks Limited\ShowShifter\hmnxmltv.exe" /c "C:\Program Files\Home Media Networks Limited\ShowShifter\listsings.xml" /S:"C:\Program Files\XMLTV Radio Times\userchannels.txt"
A couple of questions that perhapps you could help me with?
1) I would like to get XMLTV to run in the background automatically without popping up in front of SS. How do i do this?
2) After XMLTV has grabbed the listings i get another window that pops up and is the import utility into SS. Can this be made to run in the background aswel?
Any help would be appreciated.
Regards
Ben
PS Great utility by the way. It was so easy to setup even for a newbie like me.
I have managed to get the grabber to collect listings that i want and then to get showshifter to import using a bat file generated by XMLTV. See below.
"C:\Program Files\XMLTV Radio Times\xmltvrt.exe" /Grab
"C:\Program Files\Home Media Networks Limited\ShowShifter\hmnxmltv.exe" /c "C:\Program Files\Home Media Networks Limited\ShowShifter\listsings.xml" /S:"C:\Program Files\XMLTV Radio Times\userchannels.txt"
A couple of questions that perhapps you could help me with?
1) I would like to get XMLTV to run in the background automatically without popping up in front of SS. How do i do this?
2) After XMLTV has grabbed the listings i get another window that pops up and is the import utility into SS. Can this be made to run in the background aswel?
Any help would be appreciated.
Regards
Ben
PS Great utility by the way. It was so easy to setup even for a newbie like me.
-
- Site Admin
- Posts: 495
- Joined: Mon Sep 06, 2004 4:44 pm
to make my utility run in the background add "/silent" after /grab, as for the ss utility i dont know an easy way to get rid of the window, you could upgrade to 3.10, its a free upgrade and has a substantially better showguide
Last edited by alanbirtles on Mon Feb 07, 2005 9:46 pm, edited 1 time in total.
/silent still pops up an xWindow
The /silent flag stops the xmltvrt utility from being an interactive window, but it still pops up a Borland copyright window. This prevents it from being run as cron job. This is my only gripe on what is otherwise a fantasticly useful function.
(Offer of help - If you would like any assistance on xmltvrt to make it run as a full background job, I am available to help).
Adrian (adrian dot challinor at osiris dot co dot uk)
(Offer of help - If you would like any assistance on xmltvrt to make it run as a full background job, I am available to help).
Adrian (adrian dot challinor at osiris dot co dot uk)
-
- Site Admin
- Posts: 495
- Joined: Mon Sep 06, 2004 4:44 pm
-
- Site Admin
- Posts: 495
- Joined: Mon Sep 06, 2004 4:44 pm
Fails on Terminal Window
If I run from a Telnet terminal (even if I spell /Silent correctly!) it fails when initiating. The command line is
./xmltvrt /Grab /Silent -ns
When I run the exact same command inside a X windows command terminal it works, and does not display anything. This is what I think you expect. Somewhere in the initisation code it trys to open and initialize the X component even thouh it is not going to us it.
To set this up as a cron job, I created a shell script (called epgtest):
In sequence, this declares itself to be a BASH task, changes to the xmltvrt directory (thats where your code is located), removes the file data.xml and then grabs the TV listing. This works when run in an XTerm command window and prints absolutely nothing on the screen, the window, etc. It fails when run from a telnet session because it can't find the X base.
To set it as a cron job, I used crontab. In crontab, I created the following entries:
This will attempt to execute the epgtest script every 15 minutes. You cna tell if it has run successfully because there will be a file ~/xmltvrt/data.xml left behind. Thats why I delete it, it only gets created at the end of the xmltvrt run when data has been grabbed.
I am not a kyrlix programmer, but I am a pure C/C++/Java programmer. If you want any help on the code side under Unix, don't hesitate to ask (otherwise I shall press on with my policy driven archive project whilst watching TV!)
./xmltvrt /Grab /Silent -ns
When I run the exact same command inside a X windows command terminal it works, and does not display anything. This is what I think you expect. Somewhere in the initisation code it trys to open and initialize the X component even thouh it is not going to us it.
To set this up as a cron job, I created a shell script (called epgtest):
Code: Select all
#!/bin/bash
cd ~/xmltvrt
rm data.xml
./xmltvrt /Grab /Silent -ns
To set it as a cron job, I used crontab. In crontab, I created the following entries:
Code: Select all
SHELL=/bin/bash
00 * * * * $HOME/epgtest
15 * * * * $HOME/epgtest
30 * * * * $HOME/epgtest
45 * * * * $HOME/epgtest
I am not a kyrlix programmer, but I am a pure C/C++/Java programmer. If you want any help on the code side under Unix, don't hesitate to ask (otherwise I shall press on with my policy driven archive project whilst watching TV!)
-
- Site Admin
- Posts: 495
- Joined: Mon Sep 06, 2004 4:44 pm
-
- Site Admin
- Posts: 495
- Joined: Mon Sep 06, 2004 4:44 pm
Thanks - thats a fair comment. I did use this, but it broke when Radio Times changed the format and blocked XMLTV. They have a new version out that I'm trying to get working now. It has a bug and it's somewhere in the bowels of PERL (a language which I hate with a very real vengence for not logical reason at all).
Thanks for all your hard work - it really is appreciated.
Thanks for all your hard work - it really is appreciated.
-
- Site Admin
- Posts: 495
- Joined: Mon Sep 06, 2004 4:44 pm
-
- Site Admin
- Posts: 495
- Joined: Mon Sep 06, 2004 4:44 pm