How do I schedule my queries to run every hour or day?

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):

  1. 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.

  1. Running queries periodically doesn’t work for Javascript queries.

Periodic query runs are only currently only supported for non-Javascript functions.

2 Likes

I wonder, any plans for supporting this with JS queries? Is it a performance issue?

E.g I tried building a moment.js clock query linked to a text block, where the periodic run would’ve been useful.

@roland no plans yet, but I’ve put in a ticket to start thinking about it / working on it. I’ll post in this thread and tag you when it gets built :slight_smile:

3 Likes

plus one for this feature

2 Likes

It would be great if I didn’t have to keep the app open

1 Like

I agree… the scheduler is nice but it really needs to be able to run while not logged in and running. Meanwhile the product is nice and easy to use

2 Likes

Any update on this @justin ?

I am keen to trigger slack notifications in the background, it was mentioned on the integrations page. I created this thread before I saw this one:

2 Likes

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.

Thanks!

1 Like

Hey everyone! One of our engineers is working on building this this sprint :slight_smile: 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!

Any idea when this is going to be developed and released? I’m interested in triggering timed queries on a cadence as well!

1 Like

Any chance this is going to be a feature? Would be an awesome upgrade if it could run without the app being open.

Hi @ilsemaj and @seandawes! We're working on this for Q2/Q3 this year 😊

2 Likes