You are here

Is possible to split config into 2 files and separately grab EPG to 2 EPG.xml files?

9 posts / 0 new
Last post
StralEPG
Offline
Donator
Joined: 4 years
Last seen: 3 months
Is possible to split config into 2 files and separately grab EPG to 2 EPG.xml files?

You might say it's funny thing to do but sometimes I urgently need updated EPG.

I have around 60 very important channels and almost all are sport channels which change programs very often.

The rest of channels are less important to me, usual regional channels like news, movies, entertainment channels etc. and I barely watch those.

Sometimes when live sport events are about to start I need updated EPG and I need it asap. Almost always literally all sport channels have more then 8 updated programs and that's just for one day.

I would run grabbing of most important channels every day and less important channels every 2 or 3 days. And when I need it urgently grabbing process will be much much shorter.

Thanks.

P.S. I would appreciate little tutorial with few steps how to accomplish this.

mat8861
Offline
WG++ Team memberDonator
Joined: 9 years
Last seen: 1 hour

in linux you can duplicate wg like wgfolder1 wgfolder2 wgfolder3 then in crontab you set each run and how often you want to run.
crontab example to run wg every 2 hour in folder2:
# m h dom mon dow command

0 */2 * * * /home/ubuntu/Desktop/wgfolder2/run.sh

you can test crontab for time you need here https://crontab.guru/

StralEPG
Offline
Donator
Joined: 4 years
Last seen: 3 months
mat8861 wrote:

in linux you can duplicate wg like wgfolder1 wgfolder2 wgfolder3 then in crontab you set each run and how often you want to run.
crontab example to run wg every 2 hour in folder2:
# m h dom mon dow command
0 */2 * * * /home/ubuntu/Desktop/wgfolder2/run.sh
you can test crontab for time you need here https://crontab.guru/

I have Windows. And no idea how to run two instances of WebGrab.

Can same be done on Windows as on Linux? I just need new second config file to put rest of channels in it and leave ~60 of them in 1st config. And then run WebGrab 1 for config 1 and WebGrab 2 for config 2.

Idk would I achieve anything if I just make copy of WebGrab folder and make "WebGrab_2". I guess it would break everything.

sparklesunshine
Offline
Donator
Joined: 4 years
Last seen: 2 years

Simple way of doing it

Make a copy of your config file WebGrab++.config.xml and call it WebGrab++.config-other.xml

In WebGrab++.config.xml config file have all the channel source grab lines for the channels you don't care about updating often
Make sure you edit this config to output to a different filename than the other eg guide2.xml

In WebGrab++.config-other.xml file have all the channel source grab lines for everything you want to update frequently.
Again make sure in the config file the output has a different filename eg guide1.xml

Now all your have to do is name the file you want webgrab to grab the data for WebGrab++.config.xml

Rename the other one to something else

When you want webgrab to grab data for the other file just name it WebGrab++.config.xml (make sure you have already changed the config file already named WebGrab++.config.xml to something else)

Then you will have two epg xml files guide1.xml and guide2.xml

Or set up multiple instances of Web grab - see faq
http://www.webgrabplus.com/faq#faq_816

StralEPG
Offline
Donator
Joined: 4 years
Last seen: 3 months
sparklesunshine wrote:

Simple way of doing it
Make a copy of your config file WebGrab++.config.xml and call it WebGrab++.config-other.xml
In WebGrab++.config.xml config file have all the channel source grab lines for the channels you don't care about updating often
Make sure you edit this config to output to a different filename than the other eg guide2.xml
In WebGrab++.config-other.xml file have all the channel source grab lines for everything you want to update frequently.
Again make sure in the config file the output has a different filename eg guide1.xml
Now all your have to do is name the file you want webgrab to grab the data for WebGrab++.config.xml
Rename the other one to something else
When you want webgrab to grab data for the other file just name it WebGrab++.config.xml (make sure you have already changed the config file already named WebGrab++.config.xml to something else)
Then you will have two epg xml files guide1.xml and guide2.xml
Or set up multiple instances of Web grab - see faq
http://www.webgrabplus.com/faq#faq_816

Thanks for the suggestion.

That's something I already had on mind but I would rather look for automated solution. Like, running config1.xml every day and running config2.xml every 3 days all automatically.

As I boot up my PC, Windows Task Scheduler starts WG+. It's scheduled every two days in 08:00 and it's set to run as soon as possible if 08:00 is missed, usually it's missed since I turn on PC after 08:00 meaning WG+ starts immediately upon Windows start.

The ideal solution would be to schedule WG+ --> Config 1 with Task Scheduler every day and schedule WG+ --> Config 2 every 3 days with Task Scheduler.

StralEPG
Offline
Donator
Joined: 4 years
Last seen: 3 months
sparklesunshine wrote:

Simple way of doing it
Make a copy of your config file WebGrab++.config.xml and call it WebGrab++.config-other.xml
In WebGrab++.config.xml config file have all the channel source grab lines for the channels you don't care about updating often
Make sure you edit this config to output to a different filename than the other eg guide2.xml
In WebGrab++.config-other.xml file have all the channel source grab lines for everything you want to update frequently.
Again make sure in the config file the output has a different filename eg guide1.xml
Now all your have to do is name the file you want webgrab to grab the data for WebGrab++.config.xml
Rename the other one to something else
When you want webgrab to grab data for the other file just name it WebGrab++.config.xml (make sure you have already changed the config file already named WebGrab++.config.xml to something else)
Then you will have two epg xml files guide1.xml and guide2.xml
Or set up multiple instances of Web grab - see faq
http://www.webgrabplus.com/faq#faq_816

Thanks for the suggestion.

That's something I already had on mind but I would rather look for automated solution. Like, running config1.xml every day and running config2.xml every 3 days all automatically.

As I boot up my PC, Windows Task Scheduler starts WG+. It's scheduled every two days in 08:00 and it's set to run as soon as possible if 08:00 is missed, usually it's missed since I turn on PC after 08:00 meaning WG+ starts immediately upon Windows start.

The ideal solution would be to schedule WG+ --> Config 1 with Task Scheduler every day and schedule WG+ --> Config 2 every 3 days with Task Scheduler.

bebawy6
Offline
Has donated long time ago
Joined: 4 years
Last seen: 1 year

I create folder named ExtraConfig and has the new configuration file with site ini files. and setup the windows task to run from this extraconfig folder. see attached picture for the windows task and the content of the extraconfig folder. notice that the config file name still the same like the original one.. and all auto-mated.

StralEPG
Offline
Donator
Joined: 4 years
Last seen: 3 months
bebawy6 wrote:

I create folder named ExtraConfig and has the new configuration file with site ini files. and setup the windows task to run from this extraconfig folder. see attached picture for the windows task and the content of the extraconfig folder. notice that the config file name still the same like the original one.. and all auto-mated.

Oh, wow!

Does it mean Windows Task Scheduler will initiate WebGrab but with Config from ExtraConfig folder instead to use Config from main folder? Or I am mistaking? This is awesome, had no idea what's the point of that Task Scheduler option. And you even have separate Log file which is great, mine gets overwritten.

I managed to accomplish what I want but little differently. I made two batch scripts that will export Config 1 in order to import Config 2 and then later do vice versa, it will export Config 2 to import Config 1.

So final result is this:
WebGrab
Export Config 1 - Import Config 2
WebGrab
Export Config 2 - Import Config 1 (Config 1 is prepared for next grabbing process).

And now I host 2 EPG files, not a big deal. But I finally got possibility to grab most important channels very fast, only 5 minutes for Config 1 and most important channels that are almost all sports that frequently update EPG. And the 2nd one is longer process.

Now I will have to figure out is it possible to somehow make same result but with Config 1 grabbing every day and Config 2 grabbing every three days after Config 1. It can be possible but I am little worried about conflict if two WebGrab instances launch. Windows Task Scheduler has delay option but it's random value, I could put 30 minutes delay but since it's random it could make a mess if it replaces configs and launch WG+ during already grabbing process.

My PC is not awake 24/7, I've put WG+ to launch early in the morning but it won't wake up PC, I don't want that. So I made it to launch asap when I wake up PC, and every 3rd day when both Config 1 and Config 2 have to be processed config 2 might make a conflict with Config 1. The Task Scheduler delay is great feature but it says it's random (30 minutes = 1 second to 30 minutes) so it could make fatal mess by opening second instance of WG+ with different Config at the same time.

Thank you so much for letting me know about your method, I will try it asap. It looks much simpler.

bebawy6
Offline
Has donated long time ago
Joined: 4 years
Last seen: 1 year

yes you are correct it run it from the Extraconfig and not from the Original folder.

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: servercare.nl