A common use case we see in Retool apps is scheduling queries to run every time period (an hour, a day, a week, etc.). Retool supports periodically running queries, with two important caveats (for now):
- Retool natively supports running queries periodically while your app is open, but not while it’s closed.
In your query, head over to the advanced tab and you should see a checkbox titled “Run this query periodically?”
Once you check the box, you’ll be able to enter a period interval (in milliseconds) in the “Period interval” form. If we want the query to run every 10 minutes, put 10,000 in the form:
This scheduling only works while your app is open. So if you close the app, the query will not run every 10 minutes.