Narcoleptic library vs DS3231 RTC

I 'm making a project where I want the Arduino to fall asleep and then wake up every 5 minutes.
I read that there is a library called 'Narcoleptic' that can do this.
And another way is a DS3231 RTC module which will wake it up.

Given the fact that I don't care grate time accuracy (I don't mind if it's waken up every 4.5 minutes), does the use of the Narcoleptic library have any more dissadvantages in comparison to the DS3231?

(a dissadvantage of the DS3231, for me, is the extra circuitry for it's connection)

I don't use the Narcoleptic library (I use SleepyDog) but it's probably using the AVR's watchdog timer (WDT) to sleep so the actual maximum time you can sleep will be 8 seconds but you can then just increment a counter and go straight back to sleep until the counter is 38 (38 * 8 = 304 seconds) and then stay awake long enough to do something useful before resetting the counter and starting again.

Riva:
will be 8 seconds but you can then just increment a counter and go straight back to sleep until the counter is 38

Are you suggesting me to use SleepyDog?
(and certainly you don't see the need for an external RTC, right?)

panoss:
Are you suggesting me to use SleepyDog?
(and certainly you don't see the need for an external RTC, right?)

I'm not suggesting you use SleepyDog instead but it looks a bit simpler to use after checking out the Narcoleptic library but both achieve the same results.
As your not to bothered about the duration I would say a sleep library will be fine and no need for an RTC.

Maximum sleep time for SleepyDog is 8 seconds?
How can I make it sleep for 2 hours?

Sleep for 8 seconds, wake up, increment a counter. If the counter exceeds 900, do something, otherwise go back to sleep.

Something like this

#include <Adafruit_SleepyDog.h>

// 2 hours = 2 * 60 * 60 seconds = 7200
// 7200 / 8 = 900
const int16_t countDownStart = 900;

int16_t countdown = 0; //Leave at zero to first trigger on boot or set to countDownStart to first trigger after required time

void setup()
{
  Serial.begin(115200);
  Serial.println(F("Setup Begin"));

  // Do setup stuff here
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW);

  Serial.println(F("Setup End"));
  Serial.flush();
}

void loop()
{
  Watchdog.sleep();
  countdown--;
  if(countdown <= 0)
  {
    //Do something interesting after 2 hours
    Serial.println(F("I'm Awake"));
    Serial.flush();
    digitalWrite(LED_BUILTIN, HIGH);
    delay(1000);
    digitalWrite(LED_BUILTIN, LOW);

    countdown = countDownStart;
  }
}

Ok, thank you guys.

Does 'WatchDog.sleep()' allow the watchdog to reset the mcu in case it freezes?

panoss:
Does 'WatchDog.sleep()' allow the watchdog to reset the mcu in case it freezes?

I think you will need to switch between Watchdog.sleep() and Watchdog.enable()/Watchdog.disable() when awake as sleep is in effect locking up the MCU and relying on the WDT to kick it awake again.

Properly written code should not tend to allow lockups but if your code is that critical then maybe consider and external watchdog.

I tried two hours (countDownStart = 900) and the arduino freezes.

For informed help, please read and follow the directions in the "How to use this forum" post.