If you want something to happen every 30 minutes I’d recommend you look into our RTCTimer.h & .cpp.
First instantiate it:
Then initialize it:
timer.setNowCallback(getNow); // set how to get the current time
timer.every(30 * 60, ENTERYOURCALLBACKHERE);
In your loop make sure to periodically call this, you can hitch your RTC alarm every minute or your watchdog wakeup event.
The update will call your callback when enough time has passed (here it’s 30*60 seconds, 30 minutes).
Your getNow() can be anything, but it should return the current time in seconds since epoch. You probably want to ask that from your RTC like so.
This is often a question on how to juggle accuracy with power consumption. A higher resolution and lower interval means higher consumption and the need for alternative events, but with 30 minutes I’d recommend using the RTC events (every minute).