Here is a (untested) fragment that shows a modified version of the TimerAlarm example with changes to turn on and off a timer that will repeat at intervals you can set.
#include <Time.h>
#include <TimeAlarms.h>
AlarmID_t repeatTimer; // the alarm id so you can change the period on the fly
void setup()
{
setTime(8,29,40,1,1,10); // set time to 8:29:40am Jan 1 2010
Alarm.alarmRepeat(8,30,0, MorningAlarm); // 8:30am every day
Alarm.alarmRepeat(17,45,0,EveningAlarm); // 5:45pm every day
// set the repeat timer for 45 minutes
repeatTimer = Alarm.timerRepeat( 45 * SECS_PER_MIN, RepeatTask);
}
void MorningAlarm()
{
// turn on the repeat timer
Alarm.enable(repeatTimer);
}
void EveningAlarm()
{
Alarm.disable(repeatTimer);
}
void RepeatTask()
{
// this is called every 45 minutes if the alarm is on
}
loop and other code goes here....
to change the value of the repeat to 60 minutes you would make this call:
Alarm.write(repeatTimer, 60 * SECS_PER_MIN) ; // set the repeat period to 60
I hope that gets you going in the right direction
Michael