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:
I am also interested in the ability to schedule queries without the app open. Our use case is using Retool as a dashboard. We would like to run all of the Redshift queries, which can be quite slow, in the background overnight, so that they are already cached when the user loads the page.
We use this feature heavily in Mode Analytics, which is what we are looking to migrate from.
Hey everyone! One of our engineers is working on building this this sprint Don’t have a concrete ship date, but it should be within the near term. If anyone has ideas on what it should look like beyond what in the thread, feel free to message me at justin@retool.com!
@justin I see you said someone was working on periodic Javascript queries last November. Did this ever get built? I could really use this; I'd like to show warnings when tokens are about to expire or a certain time-of-day is coming up.
As an ugly workaround, I'm using a periodic REST query to a gibberish domain that's guaranteed to fail and adding my actual JS query in the "On Failure" chain.
Hi, community! For anyone who is following this thread, we are fast approaching our early access program for this feature.
While I believe I reached out to everyone who has commented until now, if you're interested in participating (or even just chatting with our engineers and seeing a demo), feel free to message me here or reach out via email at kiersten@retool.com. Thank you all for your continued engagement!