cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
Austin
Level I

Update from Database on a Timed Frequency

Hello,

I currently have a script that requires user input to define variables that are used to query a database and generate control charts. To eliminate the need for an operator to provide these inputs again to generate the control charts whenever new data is in the database, I would like to automatically update the control chart on a timed frequency. For example:

 

1. User provides input.

2. Initial database query.

3. Control Charts are generated.

4. Every two minutes, the database is queried and new data is added to the main data table.

5. New control charts are generated.

6. Repeat steps 4 & 5.

 

Thanks!

1 REPLY 1
Craige_Hales
Super User

Re: Update from Database on a Timed Frequency

Are you looking for something like this:

User provides input.
KEEPGOING = 1;
while( KEEPGOING, // the while statement with a TRUE condition will loop forever
     database query;
     Control Charts are generated;
     wait(120); // 120 second delay
); // end of while loop

You may want to dress it up a bit, maybe with a button in the UI to set the KEEPGOING flag to zero.

JMP will seem somewhat responsive during the wait...you can probably zoom in, etc, but not run more JSL.

 

It is possible the control chart only needs to be generated once, before the loop. The data table update may automatically regenerate the chart during the wait(120).

 

There is a schedule function also, which I don't recommend if the above does what you need.

Craige