I do something like this with a script called "boss.py'.
It regex matches time patterns from a dict and yells out the value by calling the mac 'say' command. I have it configured to yell at me to focus every 5 minutes and to lock me into a pomodoro-like work cycle. I run it on days I can't seem to get going.