How to Schedule Queries

Schedule your queries to run any time and automate your reporting. This feature is only available to Premium Team users.

Scheduling a query

To schedule your query, look for the Schedule Query button under the name of your query.


That will open the scheduler modal:

  1. Under Run Against, choose your database connection. You can only schedule queries against a cloud connection.
  2. Under Run On, you can schedule a query to run once at a specific day/time, or you can have it repeat every hour, day, week, etc.
  3. Next Run gives you a preview of when PopSQL will run your query.


If your query has variables, you'll see a Variables tab where you can create specify the value PopSQL should use when it runs your query. Multiple people can create multiple schedules with their own variable values. For example, your account managers might want to schedule the same query to run every morning, but with a different account_id.




On the Notifications tab, you can specify when and where PopSQL should notify you when the scheduled query completes.

Notify on

Under Notify on, you have three options:


Every time the query runs, we'll send a notification.

If there are results

If there are one or more rows returned, we'll send a notification. Example: If your average order size is $100, you can tell PopSQL to alert you when you get an order that's > $500.

If there are no results

If there are zero rows returned, we'll send a notification. Example: If you're expecting user sign ups every hour, you can tell PopSQL to notify you if there are no sign ups in the last hour.


PopSQL can notify you via email or Slack.


If you set the channel to Email, then you'll be prompted to specify some email recipients.

By default, the notification email will contain a link to see the results, and a link to download the CSV data.

Optionally, you can tell PopSQL to include the CSV or PDF as an attachment in the email.


If you set the channel to Slack, then you'll be prompted to specify the Slack channels you want notified when the query completes. You can also choose to direct message a user on Slack by entering their username.

Cookie settings