Continuing the discussion from Scheduled Jobs Failing AGAIN:
As many of you are aware, there are ongoing issues with scheduled events in SmartThings. While these are being worked on, some new issues have surfaced. One of these issues concerns the use of unschedule()
by SmartApps.
Beginning yesterday or the day before, users have also seen errors thrown that say “Undeclared Throwable Exception”. As far as I can tell, these are being thrown by unschedule()
.
For over a year, there has been discussion about how unschedule()
is not reliable, and sometimes pays a high execution time penalty, so much so that some apps would be killed due to exceeding 20 seconds runtime. Pollster is one app that has had this problem. It became clear, that Rule Machine also was vulnerable to this failure.
So, I have pushed a new release of Rule Machine, Version 1.7.5, that removes its use of unschedule()
for delayed actions with cancel and delayed on/off pending cancellation. Instead of using unschedule()
, Rule Machine now handles this logic itself.
This should improve the performance of Rule Machine for these types of operations. However, Rule Machine still makes extensive use of ST scheduling, and is still vulnerable to scheduling issues in general.