(I'm not looking for the work, just offering thoughts since I recognize none of the people on that website who are asking you for money).
I don't think this would be easy, or maybe even possible. The system's timers aren't accurate enough for what you want. So, if an alarm went off saying "it's end time", it needs to be scheduled by the OS, then go to the program, lookup the timer, determine what to do, log, process it, etc. All this will give you some unspecified, variable and uncontrolled delay.
Additionally, programmes are frequently broadcast with "groups of pictures". So, instead of broadcasting unique pictures after pictures (mjpeg), the broadcaster might have a picture sent, then a few frames that only contain differences from that pictures (such as just the bits that are a person's eyes blinking), then after a few seconds it sends a new whole frame picture so everything is reset. This is mainly to reduce space/costs. So, if you interrupt in the middle of this group you end up with "corrupted" pictures at the start of your next hour since there is no reference frame, so you have just "here are some eyes", but no "face frame".
If you don't need it real-time, I'd record a 24-hour show and then split it using an hourly (external) cron/timer task to extract the previous hour's recording from the ongoing recording by specifying a start/stop time (similar to "-ss" or "-itsoffset" in ffmpeg with "-t" duration of an hour). There are some programs that will re-encode frames from a group so you don't have corruption at the start of an hour. I think avidemux does that (which can be run as a command line). But, even then you're relying on the very start of the recording being at 00:00:00.00, which is likely to be a little off due to delays at starting, but
perhaps if you start at 23:55 then the stream
may have an internal correct broadcast timestamp that could be used.