Hi,
I am using Jython rules with cron triggers. After upgrading from 2.4 to 2.5M2 and the latest JSR232 library I noticed, that these sometimes are triggered twice. A few seconds before the actual time and at the correct time.
A few examples:
@when("Time cron 41 7 0/2 * * ?")
2019-08-18 18:07:37.720 [INFO ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication OK!
2019-08-18 18:07:42.450 [WARN ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication failure!
2019-08-19 20:07:41.034 [INFO ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication OK!
2019-08-19 22:07:42.054 [WARN ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication failure!
2019-08-20 18:07:36.879 [INFO ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication OK!
2019-08-20 18:07:42.688 [WARN ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication failure!
@when("Time cron 15 55 08 * * ?")
2019-08-14 08:55:11.773 [INFO ] [.smarthome.automation.timer_lamps.py] - Checking lamps in the morning
2019-08-14 08:55:15.773 [INFO ] [.smarthome.automation.timer_lamps.py] - Checking lamps in the morning
2019-08-15 08:55:10.729 [INFO ] [.smarthome.automation.timer_lamps.py] - Checking lamps in the morning
2019-08-15 08:55:15.729 [INFO ] [.smarthome.automation.timer_lamps.py] - Checking lamps in the morning
2019-08-16 08:55:11.689 [INFO ] [.smarthome.automation.timer_lamps.py] - Checking lamps in the morning
2019-08-16 08:55:15.689 [INFO ] [.smarthome.automation.timer_lamps.py] - Checking lamps in the morning
2019-08-17 08:55:11.629 [INFO ] [.smarthome.automation.timer_lamps.py] - Checking lamps in the morning
2019-08-17 08:55:15.629 [INFO ] [.smarthome.automation.timer_lamps.py] - Checking lamps in the morning
2019-08-18 08:55:10.579 [INFO ] [.smarthome.automation.timer_lamps.py] - Checking lamps in the morning
2019-08-18 08:55:15.579 [INFO ] [.smarthome.automation.timer_lamps.py] - Checking lamps in the morning
2019-08-19 08:55:11.520 [INFO ] [.smarthome.automation.timer_lamps.py] - Checking lamps in the morning
2019-08-19 08:55:15.520 [INFO ] [.smarthome.automation.timer_lamps.py] - Checking lamps in the morning
@when("Time cron 15 15 0 * * ?")
2019-08-14 00:15:11.002 [INFO ] [.smarthome.automation.timer_lamps.py] - It is late, switching lamps off
2019-08-14 00:15:15.003 [INFO ] [.smarthome.automation.timer_lamps.py] - It is late, switching lamps off
2019-08-15 00:15:09.958 [INFO ] [.smarthome.automation.timer_lamps.py] - It is late, switching lamps off
2019-08-15 00:15:15.959 [INFO ] [.smarthome.automation.timer_lamps.py] - It is late, switching lamps off
2019-08-16 00:15:11.919 [INFO ] [.smarthome.automation.timer_lamps.py] - It is late, switching lamps off
2019-08-16 00:15:15.919 [INFO ] [.smarthome.automation.timer_lamps.py] - It is late, switching lamps off
2019-08-17 00:15:11.859 [INFO ] [.smarthome.automation.timer_lamps.py] - It is late, switching lamps off
2019-08-17 00:15:15.861 [INFO ] [.smarthome.automation.timer_lamps.py] - It is late, switching lamps off
2019-08-18 00:15:10.811 [INFO ] [.smarthome.automation.timer_lamps.py] - It is late, switching lamps off
2019-08-18 00:15:15.811 [INFO ] [.smarthome.automation.timer_lamps.py] - It is late, switching lamps off
2019-08-19 00:15:11.750 [INFO ] [.smarthome.automation.timer_lamps.py] - It is late, switching lamps off
2019-08-19 00:15:15.751 [INFO ] [.smarthome.automation.timer_lamps.py] - It is late, switching lamps off
The first one is interesting, as the error only occurs at 18:07, not at any other time the rule is triggered:
2019-08-20 02:07:41.937 [INFO ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication OK!
2019-08-20 04:07:41.937 [INFO ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication OK!
2019-08-20 06:07:41.937 [INFO ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication OK!
2019-08-20 08:07:41.937 [INFO ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication OK!
2019-08-20 10:07:41.938 [INFO ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication OK!
2019-08-20 12:07:41.938 [INFO ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication OK!
2019-08-20 14:07:41.938 [INFO ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication OK!
2019-08-20 16:07:41.939 [INFO ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication OK!
2019-08-20 18:07:36.879 [INFO ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication OK!
2019-08-20 18:07:42.688 [WARN ] [home.automation.measurement_rules.py] - Enocean I humidity sensor communication failure!
I checked the old log files and this behavior started after the upgrade, but I do not know if it is caused by the 2.5M2 or the JSR232 libraries.
I am surprised, that nobody else reported this (or I have not found it), so maybe there is something wrong with my setup? I am using the packet installation an Debian 10 (but the error also occurred on Debian 9) with Zulu Java 8.
Juelicher