cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

How do I run JMP scripts on a schedule

jimNQBkelly
Level I

I have a series of JMP analyses that I want to run on a production basis and save the output to interactive HTML files.

I have figured out how to put the analyses into script files and dashboards, but I'm not clear how to set things up so that the computer will automatically run the scripts on a daily or hourly basis.  Is this possible?

 

Jim

1 ACCEPTED SOLUTION

Accepted Solutions
ih
Super User (Alumni) ih
Super User (Alumni)


Re: How do I run JMP scripts on a schedule

I am not sure if you are on Windows or a Mac, but in windows I use the Task Scheduler (search for it using the start button) to run batch file (choose it as the 'Application to Run').  The batch file calls JMP and tells it what script to open.  Make sure to put exit( nosave ) at the end of the jsl script.

 

Batch File:

"C:\Program Files\SAS\JMPPRO\13\jmp.exe" "C:/pathto/TaskSchedulerGraphs.jsl"

 

JSL File:

Names default to here( 1 );

dt = Open( "$SAMPLE_DATA/iris.jmp" );

height = { 800, 1080 };

t = Today();

pad = function( {v} , if( v < 10, "0", "" ) || char(v) );

for( i = 1, i <= n items( height ), i++,
	win = New Window( "graph holder",
		dt << Graph Builder(
			Size( floor( height[i] * 16 / 9 ), height[i] ),
			Show Control Panel( 0 ),
			Variables(
				X( :Sepal length ),
				Y( :Sepal width ),
				Group X( :Species ),
				Group Y( :Petal width ),
				Color( :Petal length )
			),
			Elements( Points( X, Y, Legend( 4 ) ) )
		);
	);
	pic = ( win << Find( ListBox(2) ) ) << get picture;
	ImageFilename = "iris_" || pad( Hour( t ) ) || pad( Minute( t ) ) ||
		pad( Second( t ) ) || "_" || char( height[i] ) || ".png";
	pic << Save Image( "$Desktop/" || ImageFilename );
	win << Close Window;
);

exit(nosave);

View solution in original post

3 REPLIES 3
jimNQBkelly
Level I


Re: How do I assign a start date?

The title I want for this post is: "How do I run JMP scripts on a schedule in other words on a production basis"

ih
Super User (Alumni) ih
Super User (Alumni)


Re: How do I run JMP scripts on a schedule

I am not sure if you are on Windows or a Mac, but in windows I use the Task Scheduler (search for it using the start button) to run batch file (choose it as the 'Application to Run').  The batch file calls JMP and tells it what script to open.  Make sure to put exit( nosave ) at the end of the jsl script.

 

Batch File:

"C:\Program Files\SAS\JMPPRO\13\jmp.exe" "C:/pathto/TaskSchedulerGraphs.jsl"

 

JSL File:

Names default to here( 1 );

dt = Open( "$SAMPLE_DATA/iris.jmp" );

height = { 800, 1080 };

t = Today();

pad = function( {v} , if( v < 10, "0", "" ) || char(v) );

for( i = 1, i <= n items( height ), i++,
	win = New Window( "graph holder",
		dt << Graph Builder(
			Size( floor( height[i] * 16 / 9 ), height[i] ),
			Show Control Panel( 0 ),
			Variables(
				X( :Sepal length ),
				Y( :Sepal width ),
				Group X( :Species ),
				Group Y( :Petal width ),
				Color( :Petal length )
			),
			Elements( Points( X, Y, Legend( 4 ) ) )
		);
	);
	pic = ( win << Find( ListBox(2) ) ) << get picture;
	ImageFilename = "iris_" || pad( Hour( t ) ) || pad( Minute( t ) ) ||
		pad( Second( t ) ) || "_" || char( height[i] ) || ".png";
	pic << Save Image( "$Desktop/" || ImageFilename );
	win << Close Window;
);

exit(nosave);
jimNQBkelly
Level I


Re: How do I run JMP scripts on a schedule

I'm using a windows machine.  Your answer works fine, albeit, I needed to specify that JMP would close without prompting for remembering open files.

Thank you so much