False triggering of the schedule of switching on the relay and not reading the d

Good day! I really need your help! We decided to make automatic calls to the school with a friend, the guard often or forgot to submit or submit with a big delay … Everything went according to plan until false alarms started after 2-3 hours of operation and the program for some reason does not want to read the days, although all The rest does to cheers. The idea is this:

In aruduino uno the schedule of calls (working days / Saturday days / all-no calls) is included. When the set time comes from the schedule - the relay switches on for a short time (seconds 8). Further the relay includes already the contactor, and it closes a power chain of calls. To verify the time of the Arudino will be from the DS 3231 real-time clock.

Help please with this problem! I will be very grateful if you will say in which moments the error code and how such code should look in perfect condition. We are newcomers and learn on the go, so do not judge strictly) P.s Сlock library: https://github.com/NorthernWidget/DS3231

Thank you in advance!

#include <Wire.h>
#include <DS3231.h>
 
int Rele = 7;
int Green = 5; //пин зеленый светодиод
int Blue = 9; //пин синий светодиод
int Red = 11; //пин красный светодиод
 
DS3231 Clock;
bool h12 = false;
bool PM;
bool Century;
 
void setup() {
 
Wire.begin();
pinMode(Rele, OUTPUT);
digitalWrite(Rele, HIGH);
pinMode(Green, OUTPUT);
pinMode(Blue, OUTPUT);
pinMode(Red, OUTPUT);
}
 
void loop() {
 
int second, minute, hour, day;
day = Clock.getDoW();
hour = Clock.getHour(h12, PM);
minute = Clock.getMinute();
second = Clock.getSecond();
digitalWrite(Green, HIGH);
 
if (day == 1 || 2 || 3 || 4 || 5 && hour == 8 && minute == 30 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
}
 
if (day == 1 || 2 || 3 || 4 || 5 && hour == 9 && minute == 15 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
}
 
 if (day ==  1 || 2 || 3 || 4 || 5 && hour == 9 && minute == 25 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 10 && minute == 10 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 10 && minute == 25 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 11 && minute == 10 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 11 && minute == 30 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 12 && minute == 15 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 12 && minute == 30 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 13 && minute == 15 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 13 && minute == 25 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 14 && minute == 10 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 14 && minute == 20 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 15 && minute == 05 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 15 && minute == 25 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 16 && minute == 10 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 16 && minute == 30 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 17 && minute == 15 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 17 && minute == 25 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 18 && minute == 10 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 18 && minute == 20 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 1 || 2 || 3 || 4 || 5 && hour == 19 && minute == 05 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 6 && hour == 8 && minute == 30 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
if (day == 1 || 2 || 3 || 4 || 5

I stopped reading right there.

I'm completely new and would be very grateful if you show me how to do it right

if (day == 1 || day == 2 ...would be one wayif (day >= 1 && day <= 5  ...would be another.

Thanks, here, corrected:

#include <Wire.h>
#include <DS3231.h>
 
int Rele = 7;
int Green = 5; //пин зеленый светодиод
int Blue = 9; //пин синий светодиод
int Red = 11; //пин красный светодиод
 
DS3231 Clock;
bool h12 = false;
bool PM;
bool Century;
 
void setup() {
 
Wire.begin();
pinMode(Rele, OUTPUT);
digitalWrite(Rele, HIGH);
pinMode(Green, OUTPUT);
pinMode(Blue, OUTPUT);
pinMode(Red, OUTPUT);
}
 
void loop() {
 
int second, minute, hour, day;
day = Clock.getDoW();
hour = Clock.getHour(h12, PM);
minute = Clock.getMinute();
second = Clock.getSecond();
digitalWrite(Green, HIGH);
 
if (day >= 1 && day <= 5 && hour == 8 && minute == 30 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
}
 
if (day >= 1 && day <= 5 && hour == 9 && minute == 15 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
}
 
 if (day >= 1 && day <= 5 && hour == 9 && minute == 25 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 10 && minute == 10 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 10 && minute == 25 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 11 && minute == 10 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 11 && minute == 30 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 12 && minute == 15 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 12 && minute == 30 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 13 && minute == 15 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 13 && minute == 25 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 14 && minute == 10 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 14 && minute == 20 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 15 && minute == 05 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 15 && minute == 25 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 16 && minute == 10 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 16 && minute == 30 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 17 && minute == 15 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 17 && minute == 25 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 18 && minute == 10 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 18 && minute == 20 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day >= 1 && day <= 5 && hour == 19 && minute == 05 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }
 
 if (day == 6 && hour == 8 && minute == 30 && second == 00){
  digitalWrite(Rele, LOW);
  digitalWrite(Blue, HIGH);
  delay(8000);
  digitalWrite(Blue, LOW);
  digitalWrite(Rele, HIGH);
 }

How to be further?

if (day >= 1 && day <= 5 &&Refactor