Matt,
I've added the last-modified timestamp returned in the header to the log output.
I'll continue running the script, but won't post any results unless I see issues.
shell script running every hour at 30 past the hour
echo $(date -Iseconds) $(TZ='Pacific/Auckland' date -Iseconds) $(curl -i "https://i.mjh.nz/SamsungTVPlus/" 2>&1 | grep 'last-modified:\|href="us.xml' | tr -d "\r")
Output
Time checked: Local time Time checked: NZST time Website last-modified timestamp: GMT time Website content https://i.mjh.nz/SamsungTVPlus/us.xml Website content https://i.mjh.nz/SamsungTVPlus/us.xml.gz
------------------------- ------------------------- -------------------------------------------- ----------------------------------------------------- ----------------------------------------------------------
2024-05-29T19:30:01-07:00 2024-05-30T14:30:01+12:00 last-modified: Thu, 30 May 2024 02:16:25 GMT <a href="us.xml">us.xml</a> 30-May-2024 14:05 1647200 <a href="us.xml.gz">us.xml.gz</a> 30-May-2024 14:14 292085
2024-05-29T20:30:01-07:00 2024-05-30T15:30:01+12:00 last-modified: Thu, 30 May 2024 02:16:25 GMT <a href="us.xml">us.xml</a> 30-May-2024 15:05 1646124 <a href="us.xml.gz">us.xml.gz</a> 30-May-2024 14:31 292085
I modified the cron job to run the script 3 times each hour. On the hour, 30 minutes and 45 minutes after the hour.
The only takeaway on the guide data updates I see is this.
Your website doesn't always have an updated xml (or xml.gz) available at 30 minutes after the hour.
Channels DVR will update the xml source about every hour, but the exact time varies and is based on when it does its daily morning guide update, which varies every day.
I have set the exact time Channels DVR updates the xml source for Samsung guide data using a cron job.
If I set it to update hourly at 30 minutes past the hour, I get inconsistent (late/missing) guide data, 30-90 minutes late.
If I set it to update hourly at 45 minutes past the hour, I get consistent up to date guide data, 45 minutes late.
If I set it to update hourly at 00 minutes past the hour, I get consistent up to date guide data, 60 minutes late.