Script help

Hi can someone help me make a script to use from CE?
I want it to run daily at 10 a clock and copy new guide.xml from remote share and write over existing guide.xml on remote share

Source smb://
Target smb://

Thanks !

Check the following Tutorial:

crontab -e
00 10 * * * cp smb:// smb://
Systemctl restart cron 😉

That easy

1 Like

Thanks ! Just open terminal and ssh coreelec and enter all above ?

Yeah. How do you getting Guide.xml to a Web folder?

Thanks @Portisch :wink: wasn’t able to put it in one line myself.

I grab my guide with GitHub - K-vanc/Tempest-EPG-Generator: The fastest XMLTV formatted EPG Generator with GUI and the lowest memory usage

Great tool :blush:

So it means you’re doing it manually every day and place it to a Web folder on your box with TVheadend?
What country do you grabbing epg for?
I think you’re over thinking here a little bit :wink:

No once a week , i run Tvh and grabber on my Asus nas . But have not found a way to run cronjobb on the nas to grabb and move guide from web folder to data folder yet.

Im grabbing for sweden. I know there is other options but has the best guide with ep/season info and pictures for every program

1 Like

Ah good. I was thinking you’re doing it manually :wink:

Ok thanks again for above, now next question to make all work with out manually do anything :slight_smile:
This command works from terminal to start grabbing remotely:
sudo php /volume1/Web/tempest.php engine=Generate createxmlgz=on createinvxmlgz=on

The grabbing is done under 1h , after that i want to move the guide.xml as above

How to do this in the same cron as above ?
user: test
pass: test1

Hope you can help med , thanks !

Attach your tempest.php file and I will experiment a bit :wink:

Its stock file from here

I’ve never been using tempest so got no idea how it works but installed php8-cli in entware. Started your line you gave me earlier and nothing happening. Clearly php is installed. What should it do actually? Sorry but doing it on my phone :stuck_out_tongue_winking_eye: too lazy to fire up pc…

http://localhost:/tempest.php” should start tempest

Instructions to grab and set up is here Tempest EPG Generator | Tempest-EPG-Generator

Hi Gentelmen;

I am Kivanc, the author of Tempest EPG Generator. I saw this thread by coincidence and wanted to join for some clarifications.

hi @borygo
Based on your screenshot, I see that you already run tempest.php on php-cli without any argument. This will only make it create its folder structure under "/tempest_config/. Tempest is not a fixed source epg grabber so after this point, you need to add files for epg sources that you want to use and add your selected channels into created config.xml file.

hi @Jonke
It seems you have only issue with transferring files. I am not so familier with coreelec or Asus NAS but this should work on almost all linux distros. Easiest way of achieving this is, creating a .sh file for tempest run and other copy paste jobs(if required) as below;

create a file and add the following inside;

##first run the tempest for epg generating
sudo php /volume1/Web/tempest.php engine=Generate createxmlgz=on createinvxmlgz=on
##in a command script, next line will be always executed after completion of current line
##so shell will wait tempest to finish then proceed to copy line
sudo cp smb:// smb://
##if you want to copy more files, add as example below for copying .gz compressed files
##sudo cp smb:// smb://

after giving suitable ownership and execute permission to sh file, you can add it to your cron as;

crontab -e
00 10 * * * bash /your/path/ &

& at the end, will run file as background process so you will not see anything except changed modification times on ls commands

And finally, Tempest is available in docker now with build-in php and nginx support so maybe you can directly run in your coreelec through docker.

Hope it helps

Moderator update: there is no sudo command on CoreELEC and should not be used.

1 Like

All good here , found a way to run cron run on Asus nas . Thanks for Tempest, works great

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.