- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Setting up ODBC Query to run daily
I am currently querying a couple of DB's using windows ODBC driver to read into JMP and eventually into a Data Table. I'd like to automate this process to update the DB and corresponding output scripts & Dashboards to run (for example) every day @ midnight.
Does anyone have any literature or reccomendations on how to do this?
Thanks all!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Setting up ODBC Query to run daily
The first half of my tutorial from Discovery Summit Europe 2019 covers this topic:
Brian Corcoran
JMP Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Setting up ODBC Query to run daily
A small While loop who will execute once the day of year (atmidnight) changes
runtime_limit is a small fail_save to abord the loop.
Names Default To Here( 1 );
stop_command = 0;
try(win1<<close window;);
win1 = New Window( "Timer",
V List Box(
tb1 = text box("Date: " || Format( Today(), "d.m.y h:m:s" )),
Button Box( "Cancel",
stop_command =1;
win1 << close window;
)
)
);
i = 1;
runtime_limit = 10; // max number of iterations of the loop
D_year = day of year(today());
while(!stop_command,
i++;
if(i>runtime_limit,stop_command = 1;beep();throw("runtime limit reached"));
wait(1); // execute every X secconds
if(D_year != day of year(today()),
// Execute Code
print(i);
);
D_year = day of year(today());
tb1 << set text("Date: " || Format( Today(), "d.m.y h:m:s" ));
);
- GLaDOS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Setting up ODBC Query to run daily
JSL has a Schedule() function that will allow a script to be executed some number of seconds in the future. See "Scheduling Actions" in the Scripting Guide for details.
Help==>Books==>Scripting Guide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Setting up ODBC Query to run daily
The first half of my tutorial from Discovery Summit Europe 2019 covers this topic:
Brian Corcoran
JMP Development