Hi
So I've finaly got my EPG working thanks to this wonderful application and it's time to kick it up a notch. Im using the programe in Ubuntu, more specificly XBMCBUNTU which means that everytime I want to make Webgrab update my EPG I first have to fire up the old terminal, cd into the folder and run the mono command. In my earlier thread I found out that this could be simplified by using CRON so that the EPG could update automatically. I've been trying to read up on CRON but not really getting anywhere and therefore I would need some help.
Im guessing that I would have to write some kind of script consisting of my commands which are:
cd into /home/xbmc/Downloads/Webgrab and then mono WebGrab+Plus.exe /home/xbmc/Downloads/Webgrab
After that I'm guessing that I would have to set up CRON to run that script at a specific time.
The problem is that I have no idea in how to write this script or set up CRON to run it, anyone willing to help me out with this?
Here's a simple example on how to create a bash script:
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-2.html#ss2.1
And here's how to start it from a contab:
you can check if cron is there:
crontab -l
if not, simply install it:
sudo aptitude install cron
then edit a crontab entry for the root user:
sudo env EDITOR=nano crontab -e
add a line to run your bash script, for example at midnight:
* 0 * * * /yourpath/yourscript
Those are the basics.. good luck!
Here is how i did it (Ubutnu - mythTV):
Commands to be excecuted on the commandline
The directory of WG++ is /home/tv/EPG
1. go to your EPG directory:
cd /home/tv/EPG
2. Make a script (I named it update) and past the next 3 lines into it
cd /home/tv/EPG
mono WebGrab+Plus.exe "/home/tv/EPG"
mythfilldatabase --refresh 14 --file --sourceid 1 --xmlfile ./guide.xml
3. adjust the 3rd line for XBMC. This is a line where you pass the generated guide.xml file to your own PVR software. In mythTV it is done by mythfilldatabase.
4. make the script runable
chmod +x update
5. check if this script works
./update
6. edit crontab (if not installed see comment Paul)
crontab -e
7. add next line to the contab + adjust the time you want WG++ to run (here it runs at 19:15)
15 19 * * * /home/tv/EPG/update
Hi,
From few days my script worked only when run manually.
Failed when started from cron...
I was looking for solution and step 1 in your previous post sorted it out :)
Thanks Francis