You are here

[SOLVED] Automated update

4 posts / 0 new
Last post
Joined: 10 years
Last seen: 4 years
[SOLVED] Automated update


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?

Paul's picture
Joined: 10 years
Last seen: 1 year

Here's a simple example on how to create a bash script:

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!

francis's picture
Has donated long time agoWG++ Team member
Joined: 10 years
Last seen: 2 months
Is the support helpful?
support us

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


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

Joined: 7 years
Last seen: 10 months


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

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: