How to make a Dash Interval Run consistently in the background

Hello

I have a simple Dash app that uses a dcc.Interval for a callback that reads from a temperature sensor and turns on/off my heating system accordingly and plots the temperature on a webserver. Similar to the example here (Python Programming Tutorials)

The problem is when I’m not actively connected to the webserver (e.g. via an open browser tab). The callback will not be triggered regularly meaning my heating system may be left on/off erroneously :frowning:

How can I make my interval callback still occur regularly even when I’m not monitoring it.

Thank you

I think you have to deploy the web app to a platform like Heroku or Google App Engine so it can keep running.

1 Like

Hello @tomginsberg,

Welcome to the community!

Clientside intervals are dependent upon a client accessing the website. In order to perform your request, you’d need to schedule something on the backend and then store the value in a database for your site to query.

1 Like