Schedule a refresh in Raspberry PI image

Hey...

First off, pardon my lack of Linux knowledge. I'm a novice - don't shoot me.

I am testing the Raspberry PI image and need to run a update on my sources every 2-3 hours (due to my provider). When I ran Channels on Windows, I had a BAT file run every couple hours pretty easy to run a CURL command.. Using the Raspberry PI image, I'm hitting a wall.

Options I've tested:

  1. Setup a CRON job. Doesn't appear to be a viable option as file system is read only.
  2. Setup a SYSTEMD job. Again, doesn't appear to be viable as file system is read only.

Any Linux experts out here help a guy out?

Just do this from another computer and hit it over the network.

What exactly are you trying to update? There are built in options for m3u and xmltv refresh every few hours.

1 Like

I considered that-- but not another computer on the network that I keep running all day

update the M3U... where is the option to update every few hours? Under Settings, Sources, Edit Settings-- there is only "never refresh" or "refresh url daily".. i need it updated every 2-3 hours for this particular source

Maybe systemd user service in home dir?

Tnx will give it a shot. Was under impression whole system was squash and read only.

Unless I could talk you into adding more refresh options for M3U other than daily??

** Edit
Tried in /home ... looks like this folder is locked to read only as well.

Hey TMM1... so what's the chances of you guys adding more refresh options for Refresh URL more than daily?

Something like you have under XMLTV refresh would be perfect!

image

Just thought I'd post a solution I figured out until devs could add more refresh options..

The Channels DVR only PI build has docker at least, and this docker image has cron/curl built into it.
https://hub.docker.com/r/jsonfry/curl-cron

install that docker image, then run this command .. replace SERVERIP and SOURCENAME with your custom channel. this will run refresh every 2 hours

docker run -d --restart unless-stopped
-e OPTIONS='-s -XPOST http://serverIP:8089/providers/m3u/sources/SOURENAME/refresh'
-e CRON_SCHEDULE="0 2 * * *"
jsonfry/curl-cron

1 Like

slight change to cron_schedule as thats only setup for every day at 0200 and syntax in restart=always to always start at a reboot

docker run -d --restart=always
-e OPTIONS='-s -XPOST http://serverIP:8089/providers/m3u/sources/SOURENAME/refresh'
-e CRON_SCHEDULE="0 */2 * * *"
jsonfry/curl-cron