rtc to switch on every set min and hour

using a RTC i would like to toggle a pin every (whatever settable hour and min) and to be on for a certain amount of time

the menu to choose how to toggle how often it switches ( every hour and min) i can do

but i can't for the life of me figure out how to toggle it every certain amount of time for however length of time set

scenario - if i wanted a led to come on every hour 15 min and stay on for 12 min

i'm using the rtc library from rinky dink

please enlighten me

any help appreciated

First timer here so going to tag along for possible explanation--will soon be needing to write similar coding and have no programming experience.

Mahalo!

Test the value of the RTC - when the start time is equal to or greater than start time - then start process - then you have a couple of options

Use the mills function (see top of forum for doing several things at once)

Or - add the desired time on to the start time in a new variable and when the RTC is equal to or greater than the end time turn the process - CAUTION - bit tricky when the time wraps around the top of the hour