Excessive Scheduled Jobs In RM5.0 App

I've just been looking around to see what's new in 2.2.9.xxx.
I see in logs there is now a tab for jobs.
When clicking on it I saw that I'm now getting numerous jobs for the same app.
When I look at the apps scheduled jobs the are numerous jobs scheduled. At a guess I would say there are 200 jobs scheduled at present.
I installed 2.2.9.146 this morning so there has been a reboot today.
Opening the rule and then clicking 'Done' clears the jobs apart from the 2 I would expect at 10:00 and 21:00.
Here is the rule.

Summary

Here is a snapshot of just some of the scheduled jobs.

Summary

Just tagging @bravenel as I believe you are the RM guru.

I will look into it. Open the rule and hit Done. Obviously, those should be cleared out, not sure yet why they aren't.

I just amended the OP above with this.
Thanks.

Can you tell me what would ordinarily occur with this rule? Would the Virt-Lux <25 Switch change states frequently?

No. The virtual Lux switch turns on or off when a lux device goes above or below that value so it may turn on or off a couple of times around dawn or dusk but does not get continually evaluated at every light level change.
As an aside I just tried a backup and reboot to see if new scheduled jobs are created, and they are not. I also wandered into the room to see if motion caused the rule to re-schedule and it did not.
Looking at the jobs tab I have a few rules with lots of scheduled jobs in.

Just a question. When the scheduled time job runs and there are multiple entries for the same time, would that clear out all jobs scheduled for that time.
If so, I'm happy to see what has happened tomorrow.

Also, when I updated my hubs this morning this hub did not come back. I did a power down/up on it and everything was fine. Maybe this provoked something. :man_shrugging:

They are actually each going to fire the rule. So it's a problem that needs to be solved. The code should clear those out, but it isn't, and I have to trace where it should be doing that.

1 Like

I am able to reproduce this behavior, so can find where it happens.

4 Likes

Fix for this in the next release.

7 Likes

Thanks Bruce.
Now we can look at pending jobs I'll go through the rules that are showing this issue and click 'done'.

Hitting "done" clears them for 1 day only. The extra jobs come back the next day. I have to click done every day.

Yes, there is a bug, one that is fixed in the next release.

3 Likes

Hi @bravenel
I'm afraid this issue is still happening.
Just checked a device that was getting the issue on 2.2.9 build and I have multiple entries.
I'm running 2.3.0.113.
The rule is the same as mentioned in post 1.
Is there any info I can gather for you to investigate further?

EDIT: Would the jobs just need clearing out by clicking 'Done' or should the update have cleared them?

Hitting Done would clear them out, not update. I will look at this again and see if I can replicate, or see where this might be happening.

1 Like

Thanks. I've hit done on all the offending rules and this has cleared out all repeated schedules.
I'll monitor and see if it is still happening.
I just wasn't sure if updating to 2.3.0.xxx would have cleared the existing schedules out or whether they were a legacy left behind with 2.2.9.

I just tested this, and I'm not seeing multiple scheduled jobs, just the next one for tomorrow:

Let me know how this works out for you...

1 Like

Hi @bravenel
I opened this rule yesterday and clicked 'Done'.
Looking at the schedule there was only 2 scheduled jobs.
One for 10:00 and one for 21:00.
On checking today I now have 8 scheduled jobs.

Summary

Summary

Looks like the issue is still there.
2.3.0.113 btw.

Can you show me the Event Subscriptions for that rule.

Here you go.
The predicate is currently true if that info is needed.

Summary

This is frustrating. I have a rule setup just like yours, and I cannot get it to fail on the scheduling.

I'll rewrite it in 5.1 and see what happens.
Not a big deal as it is a very simple rule.
I can see this happening on a few rules though.
All small and I may just rewrite as I find them.