Preset executed twice for one same event

#1

I create 1 preset that log all received event.
This preset only consist provision parameter.
And the provision parameter is like this :
let ts = Date.now()-60000;
let mybootstrap = declare(“Events.0_BOOTSTRAP”, {value: ts});
let myboot = declare(“Events.1_BOOT”, {value: ts});
let myperiodic = declare(“Events.2_PERIODIC”, {value: ts});
let myscheduled = declare(“Events.3_SCHEDULED”, {value: ts});
let myvaluechange = declare(“Events.4_VALUE CHANGE”, {value: ts});
let myconnectionrequest = declare(“Events.6_CONNECTION REQUEST”, {value: ts});
let mymreboot = declare(“Events.M_Reboot”, {value: ts});
let myscheduledinform = declare(“Events.M_Scheduled_Inform”, {value: ts});
let mytest;

if(myvaluechange.value && myvaluechange.value[0] > ts){
log("EVENTCHECK VALUE CHANGE : “+myvaluechange.value+” “+ts);
}
if(myboot.value && myboot.value[0] > ts){
log(“EVENTCHECK BOOT :”+myboot.value+” “+ts);
}
if(myconnectionrequest.value && myconnectionrequest.value[0] > ts){
log(“EVENTCHECK CONNECTION REQUEST :”+myconnectionrequest.value+” "+ts);
}
if(myperiodic.value && myperiodic.value[0] > ts){
log("EVENTCHECK PERIODIC : “+myperiodic.value+” "+ts);
}

From log file I get following result :

2019-02-09T10:22:59.379Z [INFO] ::1 a4f4c2-968380GERG-XXXX0135f828: Script: EVENTCHECK PERIODIC : 1549707749456,xsd:dateTime 1549707689456
2019-02-09T10:22:59.460Z [INFO] ::1 a4f4c2-968380GERG-XXXX0135f828: Script: EVENTCHECK PERIODIC : 1549707749456,xsd:dateTime 1549707689456

Is it normal ? Can we protect the preset is fired more than once for one event ?

#2

This is normal. Presets are executed in a loop until there’s more changes to be made.