SODAQ Autonomo RTC clock

We are making a sensor hub using autonomo , and need to read data every 15minutes or so and sleep rest of the time. Data gathering and sending part is working fine, but we are encountering difficulty when using sleep.
To wake-up, after every ‘X’ time interval we are using RTCZero library and toggling the onboard LED as a check. The issue is that if condition is executed once, after that it’s never executed.
The code we used is:

#include <RTCZero.h>
RTCZero rtc;
uint8_t seconds = 0;
uint8_t minutes = 00;
uint8_t hours = 00;
volatile bool rtc_flag = false;
void setup()
{
pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
delay(5000);
digitalWrite(13, LOW);
rtc.begin(true);
rtc.setTime(hours, minutes, seconds);
rtc.setAlarmTime(00,1,00);
rtc.enableAlarm(rtc.MATCH_MMSS);
minutes+=1;
rtc.attachInterrupt(alarmMatch);
}

void loop()
{
if(rtc_flag)
{
rtc.disableAlarm();
rtc_flag = false;
digitalWrite(13, HIGH);
delay(1000);
minutes+=1;
rtc.setAlarmTime(00,minutes,00);
rtc.enableAlarm(rtc.MATCH_MMSS);
digitalWrite(13, LOW);
}
rtc.standbyMode(); // Sleep until next alarm match
}

void alarmMatch()
{
rtc_flag = true;
}
}

Is there any other way to achieve sleep of ‘X’ minutes continuously.

That code seems to work correctly for me (with the #include line fixed and the extra ‘}’ removed from the end).

You can schedule regular alarms for whole units, e.g. once a minute, once an hour, once a day etc.
This is done through the match parameter to enableAlarm().

If you want to schedule alarms for other periods, you have to schedule the alarm each time (like you have done here).
You must make sure that you don’t schedule it for the current time or a time that has already past.