I think I'll make it configurable.
Regarding a log, here's what I've setup so far:
2025-03-01 17:54:07 - Checking for DVR jobs set to start in the next 10 minutes...
{
"id": "1740877200-ch6001",
"name": "NBA Countdown",
"start_time": 1740877200,
"end_time": 1740879010,
"duration": 1810,
"channels": [
"6001"
],
"skipped": false,
"failed": false,
"updated_at": 1740876819438,
"item": {
"show_id": "9668236",
"program_id": "EP016700270183",
"episode_number": 22,
"title": "NBA Countdown",
"summary": "Bold opinions, discussion and debate centered on the top storylines from around the league.",
"full_summary": "Bold opinions, discussion and debate centered on the top storylines from around the league. Mike Greenberg hosts this pregame show with analysts Stephen A. Smith and Michael Wilbon.",
"image_url": "https://tmsimg.fancybits.co/assets/p9668236_b_h9_ag.jpg?w=720&h=540",
"playback_time": 0,
"original_air_date": "2025-03-01",
"genres": [
"Basketball"
],
"tags": [
"CC",
"HD 720p",
"HDTV",
"Live",
"New",
"Stereo"
],
"categories": [
"Episode",
"Sports non-event"
],
"cast": [
"Malika Andrews",
"Stephen A. Smith",
"Kendrick Perkins"
],
"watched": false,
"favorited": false,
"delayed": false,
"cancelled": false,
"corrupted": false,
"completed": false,
"processed": false,
"locked": false,
"verified": false
}
}
2025-03-01 18:04:14 - Checking for DVR jobs set to start in the next 10 minutes...
2025-03-01 18:14:14 - Checking for DVR jobs set to start in the next 10 minutes...
2025-03-01 18:24:14 - Checking for DVR jobs set to start in the next 10 minutes...
2025-03-01 18:34:14 - Checking for DVR jobs set to start in the next 10 minutes...
2025-03-01 18:44:14 - Checking for DVR jobs set to start in the next 10 minutes...
2025-03-01 18:54:14 - Checking for DVR jobs set to start in the next 10 minutes...
2025-03-01 19:04:14 - Checking for DVR jobs set to start in the next 10 minutes...
2025-03-01 19:14:14 - Checking for DVR jobs set to start in the next 10 minutes...
The JSON indicates a match at the time shown just above. As you can see, at least in my case, there's only about a +7 seconds required to allow for script run (including notifications to offline and tailscale clients, which take a few extra seconds).