Concurrent server queries

Is there a way to run a server connect query after another one completes on a page that doesn’t really have any buttons or actions. Just running in the backround?

Here is what i have…
I have a page that loads a Paged Query to send out emails to clients. Each query returns about 250 emails and sends them out. The page waits about 10 minutes before running the query again.

What i want to have happen is once the query is completed and there are no more results to be displayed in the query…another query will run and reset the database. But i only want this to run after all of the emails have been sent.

Sometimes this page can auto-refresh about 15 times before there is no data in the query, so i can’t have this run each time.

Is that possible? I couldn’t figure out what functions to use to complete this.

You could try using a page flow. Then they will run in order one after the next.

i did try to set that up, but the issue i ran into is that the original query that runs every 10 minutes i couldn’t get to loop. I would need to trigger that server connect query every 10 minutes. But the loop function only seems to run it one time.

Maybe i missed something?

the query only produces 250 results each run, so every 10 minutes it produces another 250 until it runs out.

If you are trying to run a query every ten minutes that is what the scheduler is for.

okay, great. This should work. Quick question…how do you get it to stop once there is no records populated?

so i was able to get it all to work.

I had to setup a variable in the server query. Then when i ran the Action Scheduler, i had to refresh every 10 minutes with a condition to check for the value of this variable. If the value was 1 then it sent out the emails and continued on.

once the query returned empty results, the variable returned a value of 0. I then had the condition on the Action Scheduler to stop the action if the value of the variable was 0.

Took a little trial and testing to get everything to work as i needed it to, but all is well.