events controlled by ds1307

If you have code that is set up like this to trigger for different events

  if (hour() >= 6 && minute() >= 00) {
   sunrise_cycle();
   Serial.println("SEQUENCE: Sunrise_Preset active");
  }
   else if (hour() >= 9 && minute() >= 30){
     daytime_cycle();
     Serial.println("SEQUENCE: Daytime_Preset active");
   }
  else if (hour() >= 19 && minute() >= 15){
    sunset_cycle();
    Serial.println("SEQUENCE: Sunset_Preset active");
  }
  else if (hour() >= 21 && minute() >= 30){
     night_time_cycle();
     Serial.println("SEQUENCE: Night_time_Preset active");
   }

When the clock resets at midnight to 0, will the loop reset too? I need to make sure that the lighting presets trigger when the device gets unplugged or reset.

There does not appear to be a loop to reset to zero in the code you have posted.

You need to think through how your code will respond to various times. For example, if the time is 05:20 what happens? Answer: nothing because your code doesn't handle the situation where the time is less than 06:00 What happens if the time is 06:42 - it will execute sunrise_cycle(), which is what you want. But what happens if the time is 12:43? It executes sunrise_cycle() because 12:43 is greater than 06:00. You can avoid this problem by testing the times in the reverse order, i.e. start with 21:30 and work your way down.

Pete