Strange Time/Alarm Behavior

Hello All,

The following code has run without issues for months, but lately is triggered mutliple times. What am I doing wrong, or how do I avoid it in future?

void loop()
{

if (Time.hour() == alarmhour) {
    if (Time.minute() == alarmminute) {
        if(Time.second() <= 2) {//alarm second (to avoid running multiple times)
            Particle.publish("Dose", "snack", PUBLIC);//Dose variable change cues IFTTT notification
            turkeyinstraw();
            feedDose(500);
            }
        }
    }

if (Time.hour() == alarmhour2) {
    if (Time.minute() == alarmminute2) {
        if(Time.second() <= 2) {//alarm second (to avoid running multiple times)
            Particle.publish("Dose", "snack", PUBLIC);//Dose variable change cues IFTTT notification
            turkeyinstraw();
            feedDose(snackdose);
            }
        }
    }

if (Time.hour() == alarmhour3) {
        if (Time.minute() == alarmminute3) {
            if(Time.second() <= 2) {//alarm second (to avoid running multiple times)
                Particle.publish("Dose", "snack", PUBLIC);//Dose variable change cues IFTTT notification
                turkeyinstraw();
                feedDose(mealdose);
                }
            }
        }
            
}

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.