SLEEP MODE ALARM

Hi:
I have the code attached. I want to build an alarm each 1 minte. In line 50 RTC.setAlarm(ALM1_MATCH_MINUTES ,0,minute(t)+time_interval,0), I put this condition. Everything works fine, however when change hour program stop. In others words, if the last measurment is at 14:59 the next at 15:00 never happen.
Help me please

program_box_01_sleep.ino (6.88 KB)

if the last measurment is at 14:59 the next at 15:00 never happen.

It looks like your code sets the alarm to the next minute, in the current hour. What is the next minute, in the current hour, after 14:59?

Yeah! Maybe you're right. However, I do not how to change that.