Scheduler and Polling quits after some minutes, hours, or days

you know I read an article recently where a guy used a raspberry pi to periodically test his internet speed and it it dropped below a certain point it would post on Comcasts Twitter feed his speed and issue. Maybe we should look into this for failed activities or connection issues with ST.

1 Like

Can I just say this is a measurement I could use. LOL! :wink:

1 Like

but that was a happy typo lol

1 Like

Just a note 5 minutes and 1 minute timers are still dying after a few days

I’m still seeing runEvery*() timers stop working after a while.

Below is a screenshot of an every5 minute schedule, which last ran on Monday (6 days ago):

This is ridiculous. As far as I’m concerned the SmartThings ecosystem is broken if apps cannot run reliably.

What is the status of this bug? How come the SmartThings developer team hasn’t commented on this? Do they even monitor the forums? If not, how can we ensure they’re tracking this issue?

1 Like

We are in the process of migrating everyone to a new scheduler that should fix issues with scheduled jobs. We have beta testers running on the new scheduler now and will be doing a wider release soon. We also made a post about changes to cron jobs here

If you have any other questions don’t hesitate to reach out to myself or @slagle on the community

1 Like

What would this ‘new’ scheduler do to/for runIn, runOnce and other scheduling API’s reliability? Right now even runIn has a ~95% success rate.

@RBoy

Check out the docs around scheduling and make note of anything you think needs clarification. I will tag @Jim on this as well.

http://smartthings.readthedocs.org/en/latest/smartapp-developers-guide/scheduling.html

1 Like

Do note there is a rather large change to those docs coming very soon. I’ll update here when it’s live.

1 Like

@jody.albritton That is fantastic to hear. Thank you for updating us. I’m on the beta scheduler, and so far looks good.

One thing I’ve noticed with the beta scheduler is that “Prev Run Time” doesn’t appear to be filled in, though the jobs seem to execute.

Other than that, schedules are reliable so far!

1 Like

@jody.albritton so I guess now would be a good time to understand what made the old system ‘unreliable’ and why the timers were dying?

Nah… Why beat a dead horse? (or, rather, a dying one with a new foal in the stable!)

2 Likes

It’s good to know why the horse died, never know what may set off the new horse :slight_smile:

EDIT: 2 part question:

  1. Why did the old scheduler fail
  2. More interested in what impact will the new scheduler have on the runIn accuracy and reliability (if any)

@jody.albritton @slagle

1 Like

Reports in other threads that some members showing no scheduled jobs at all after a few hours ago. Mine were also all blank (“no jobs scheduled”) for every smartapp.

Check your IDE to see if tonight’s or tomorrow’s jobs show as scheduled.

Changes live here. The changes are more organizational and clarifying in nature; there is a new section on viewing schedules in the IDE since that wasn’t there before, and some more information/examples around cron schedules.

@Jim @jody.albritton What would it take to beta test the new scheduler. As one who has had tons of problems, I just quit complaining. Your thoughts?

@jody.albritton or @slagle can get you set up.

This is awesome news!

Two things:

  1. Can you tell us, please, what the fundamental problem is with the existing scheduler at a technical level, and
  2. Tell us what the architecture changes are for the new scheduler?

To many dev teams, the first thought on hearing questions like this is usually “Why do they care what changed, as long as it worked now!?!?”. I understand this sentiment, as I am a software architect/consultant myself, and live with user questions like this often. But, also from a developer perspective, since Smartthings is a developer platform, I can say that it will give people a LOT more confidence if they can simply understand what happened and what the resolution is.

Also, you’ll just make us devs happy :smile:. Types like us enjoy hearing about techie solutions. And admit it - you owe us a smile or two for all the pain we’ve had with scheduling :wink:. Since Smartthings wouldn’t be what it is without the family of developers pouring their efforts into making it a better platform than it already is, happy devs is a great goal of all!

1 Like

@jody.albritton @slagle

This pattern is prone to failure, because any single scheduled execution failure that results in handler() not being called, means it will not be able to reschedule itself. One failure causes the whole chain to collapse.

This is what I’m referring to, why should the new scheduler run into an issue where the schedule doesn’t fire ever? Hereto what was the root cause of the issue with the old scheduler

1 Like

We have a communication about ticker going out this morning.

2 Likes