- Platform information:
- Hardware: Beaglebone
- OS: Ubuntu
- Java Runtime Environment: java version "1.8.0_77"
Java™ SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot™ Client VM (build 25.77-b03, mixed mode) - openHAB version: 2.0.0 (How do I check the version)
- Issue of the topic: I’ve a cron job that’s stopped working
I’m using monit to verify that my openhab system is all nice and happy, and getting it to reboot if it’s been down for 15 minutes.
In order to verify that all’s good, I’ve a simple rule that runs: “Watchdog” that prints a line in the config every 10 minutes, so monit see’s some activity.
However, recently it’s stopped working
And I just discovered why - it always helps to re-read configuration files:
The Rule in question:
rule "Watchdog"
when
Time cron "0 0/10 * * * ?"
then
logInfo(“watchdog.rules”, “Still running”)
end
However, I’d copied this to a new rule (and changed the guts, but accidentally left the rule name the same.
This caused 2 rules to load with the same name (from different files), and so I’m guessing only the second one gets executed (At least I can verify the second one was getting executed).
Can I request that some warning gets put into the logs if there is a clash? e.g. “[WARN] - overwriting rule definition”
Hopefully this stops someone else making the same mistake