OpenHAB3 Time cron Rule Trigger Issue - Multiple Triggering

I am running OH3.0.1 on Windows 10 and am experiencing a Time cron rule trigger issue. The rule is suppose to trigger once every hour when not much else is happening. However, I find that on occasion (2-3 times per day) the rule triggers 2 times as recorded in the 2 email messages:

MsgNumber = 9
Clock_Time is = 04/12/21 @ 05:02:00 AM
Running Schedules = 2 

followed by

MsgNumber = 10
Clock_Time is = 04/12/21 @ 05:02:00 AM
Running Schedules = 2 

I have also seen the same with time stamps that are not identical.

Here’s the rule

.rules

var Number MsgNumber = 0

rule "Clock_Time_Message"  //=====================================================================================================
when
	//	
	Time cron "1 2 0/1 ? * * *"	// Run every 1 hours at 2 minutes + 1 seconds after the hour

then	if (GreenFlag == 0) return;

	MsgNumber = MsgNumber + 1

	PC_Date.postUpdate(new DateTimeType())
	var String ClockTime = PC_Date.state.format("%tD") + " @ " + PC_Date.state.format("%tr")

	var mailActions = getActions("mail", "mail:smtp:GmailPC4996")
	
	mailActions.sendMail(Email_Admin,  "PC4996 Clock Time", "MsgNumber = " + MsgNumber + "\nClock_Time is = " + ClockTime + "\nRunning Schedules = " + PC_Activity.state)
	logInfo("PC4996_MESSAGING", ">>>>> Email_Admin Completed")

end

Can someone provide insight to this anomaly?

Thanks in advance.

I think this is a bug that has been fixed in the latest milestone. I remember seeing reports of mulitple cron triggers and a PR get merged to address that.

1 Like

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