FreeGuide | FAQ »
Download Listings From Cron |
|
I run Linux: how can I setup a cron job to have FreeGuide retrieve listings?You'll need to use XMLTV to download the listings, and then put them somewhere so FreeGuide can import them the next time it starts up. Essentially, you'll use the XMLTV grabber to retrieve the listings and redirect to an .xmltv file in the FreeGuide directory. The next time you start FreeGuide, the new listings will be read in.
tv_grab_na_dd --quiet --config-file "%config_file%"
The config file is stored in the FreeGuide working directory under a sub-directory called xmltv-configs. You will need to specify the exact path, the variable in the command above won't work right.
#!/bin/bash tv_grab_na_dd --quiet --config-file ~/.freeguide/xmltv-configs/na_dd.conf > ~/.freeguide/list.xmltv If your .freeguide working directory is *not* in your home directory, then you'll need to replace the ~/ part with the path to the FreeGuide directory.
chmod the file 700 and try running it. The script should download the latest listings and dump them out to an .xmltv file in your .freeguide directory.
Go ahead and start FreeGuide. There should be a short delay as it reads in the downloaded listings.
If you're unfamiliar with cron, I suggest reviewing the crontab man page via "man 5 crontab".
There are 5 fields that define *when* a cronjob is run. To do a cronjob that runs at 5:30 on Sunday, then run 'crontab -e' and put on a single line:
30 5 * * 0 ~/bin/SHELLSCRIPT
Use whatever you called your shell script instead of SHELLSCRIPT.
If your cronjob is run as the user, it should work at the correct time. If you end up with an error about command not found or something, you will probably need to specify the exact path to the shell script like this:
30 5 * * 0 /home/YOUR_USERNAME/bin/SHELLSCRIPT
Good luck, and ContactUs if you have problems. |
If you would like to help improve this site, please Contact Us and we will give you the password to edit pages. | |
Page last modified on June 04, 2008, at 01:33 AM PmWiki Info |