DS3231 RTC with multiple Interrupt Service Routines

Dear fellow Arduino enthusiasts,

I have programmed my ATMEGA328 standalone as well as on the Arduino UNO to wake up each minute, record some sensor values and then go back to sleep again. The interrupt is triggered by a DS3231 module like this one:
https://www.ebay.de/i/113718748145

with the library from Makuna:
https://github.com/Makuna/Rtc

Sadly, the module is equipped with all the power consuming stuff like pullup resistors, charging IC and LED. I will probably remove that for even lower power.

To sum up, everything works fine with following code reduced for simplicity:

#include <Wire.h>
#include <SPI.h>

#include <OneWire.h> //library for the temperature sensor
#include <LowPower.h> //rocketscream library
#include <RtcDS3231.h> //RTC library clock that sets the RTC alarm and RTC time
#include <DallasTemperature.h> //DS18 digital temperature library
RtcDS3231<TwoWire> Rtc2(Wire);
volatile boolean alarm = 1;
const byte interruptPin=3;

}

void do_send(osjob_t* j){
    alarm = false;
  RtcDateTime timestamp = Rtc2.GetDateTime();
   
}

void setup() {
    delay(5000); //delay to get the chip programmed
    Serial.begin(115200);
    
    Serial.println(F("Starting..."));
    
  

    pinMode(ECPin,INPUT);
  pinMode(ECPower,OUTPUT);//Setting pin for sourcing current
  pinMode(interruptPin, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(interruptPin), handleInterrupt, FALLING);
  
//Section for RTCzero library that sets the internal time of the MCU and puts the MCU to sleep via standbyMode();

Rtc2.Begin();
RtcDateTime compiled = RtcDateTime(__DATE__, __TIME__);
Rtc2.SetDateTime(compiled);
RtcDateTime now = Rtc2.GetDateTime();
Rtc2.Enable32kHzPin(false);
Rtc2.SetSquareWavePin(DS3231SquareWavePin_ModeAlarmBoth); 

RtcDateTime alarmTime = now + 88; // into the future
    DS3231AlarmOne alarm1(
            alarmTime.Day(),
            alarmTime.Hour(),
            alarmTime.Minute(), 
            alarmTime.Second(),
            DS3231AlarmOneControl_HoursMinutesSecondsMatch);
  Rtc2.SetAlarmOne(alarm1);          
    DS3231AlarmTwo alarm2(
            0,
            0,
            0, 
            DS3231AlarmTwoControl_OncePerMinute);
    Rtc2.SetAlarmTwo(alarm2);
    Rtc2.LatchAlarmsTriggeredFlags();  
    sensors.begin();  
}

void loop() {
  if (alarm == true) {
   // handleAlarm();
    os_runloop_once();
  }
 //  LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF); 
}

void handleInterrupt() {
  alarm = true;
}

I would now also like to have the functionality to call interrupts each 5 or 15 minutes or each 2 hours. How can that be achieved?

I would also like to have different Interrupt Service Routines. The one that interrupts each 1 minute should measure different sensor values than the one that interrupts each hour.

Do you have any idea how this can be realized? Please forward me links or ideas :).

Thank you!

Program the RTC to interrupt the Ardiuino each 5 minutes (greatest common denominator of 5, 15 and 120 minutes). Then count the interrupts in the code. Each time you wake up, call the code for the 5 minutes. Every third time call the code for 15 minutes and every 24th time call the code for 2 hours.

Similar answer to replay #1.

Set up separate functions for the 1-minute, 5-minute, 15-minute, and 2-hour sensor readings.
When the interrupt occurs, read the time from the RTC.
Always do the 1-minute function.
If the minutes are evenly divisible by 5, do the 5-minute function.
If the minutes are evenly divisible by 15, do the 15-minute function.
If the hours are evenly divisible by 2 and the minutes are zero, do the 2-hour function.

david_2018:
Similar answer to replay #1.

Set up separate functions for the 1-minute, 5-minute, 15-minute, and 2-hour sensor readings.
When the interrupt occurs, read the time from the RTC.
Always do the 1-minute function.
If the minutes are evenly divisible by 5, do the 5-minute function.
If the minutes are evenly divisible by 15, do the 15-minute function.
If the hours are evenly divisible by 2 and the minutes are zero, do the 2-hour function.

Thank you a lot David! That will help me a lot to build multiple ISRs. Could you maybe also give me a hint on how to call interrupts each 5 minutes (and not each minute, hour or day) using the DS3231 module?