cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Mikasa
Level II

The task scheduler in windows never stop running my script.

Hi all

I have made a script to daily report a Html file. I am using Task scheduler in windows 10 to run the jsl every day.  I have

to Action: "C:\Program Files\SAS\....\14\jmp.exe",  location: "C:\....\myscript.jsl"

I have closed all tables in the script and put Quit("no save"); at the end, but the job is running for ever with no result and stopping.

Has any one a solution or any clue?

 

Thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
Craige_Hales
Super User

Re: The task scheduler in windows never stop running my script.

Your filename does not appear to have any extension at all, "C:\Users\a...\OneDrive". That looks more like a folder name than a .JSL file. If it is actually MS OneDrive files-in-the-cloud, someone else may be able to help better than I can.

Craige

View solution in original post

Ryan_Gilmore
Community Manager Community Manager

Re: The task scheduler in windows never stop running my script.

From my experience, if the script runs outside of the scheduled task, then I would check the following:

 

  • Permissions. Does the scheduled task have the same permissions as when running JMP interactively?
  • File location. Are references to files correct? Maybe the default directory is different when running the scheduled task than when running manually?
  • Preferences. Are the JMP preferences the same when running the task compared to when you run manually?

Another possibility...does the script exit JMP?

 

I would suggest starting with a "hello world" type script and get that to work as a scheduled task. You can then progress to your current script.

 

A few other resources that may prove helpful,

View solution in original post

18 REPLIES 18
Craige_Hales
Super User

Re: The task scheduler in windows never stop running my script.

If you run your script from a CMD window, does JMP produce the results and shutdown correctly? From the prompt, you should be able to do this:

Capture.PNG

The echo command just makes a very short file, then JMP runs it. I see JMP open for a few seconds, then goes away.

You can get the correct path to JMP from the desktop icon properties. Mine (above) is not the usual path. And looking back, I should look up quit() in the scripting index and see what it expects its parameter to be...

Craige
Mikasa
Level II

Re: The task scheduler in windows never stop running my script.

I've never done that in CMD and I tried but it does not recognized the command
the path for my JMP is
C:\Program Files\SAS\JMPPRO\14\jmp.exe
the script is in another path
Craige_Hales
Super User

Re: The task scheduler in windows never stop running my script.

The spaces in the filenames (Program Files) may be why it did not work. You'll probably need quotation marks similar to what you showed:

 

 "C:\Program Files\SAS\JMPPRO\14\jmp.exe"    "C:\....\myscript.jsl"

 

Another question: after the scheduler starts JMP, and JMP doesn't stop, what do you see in the JMP log window?

Craige
Mikasa
Level II

Re: The task scheduler in windows never stop running my script.

Thanks @Craige_Hales 

It can be run in CMD perfectly.

Task scheduler does not give me any log file since it does not stop running.!

Craige_Hales
Super User

Re: The task scheduler in windows never stop running my script.

Is there a JMP window still open? Maybe minimized on the task bar? Can you get to the JMP menu and view->log?

Is there a hidden dialog that you can alt-tab to? Is JMP in a loop, and will Esc key stop the loop?

Can you share a picture of what you are seeing?

 

Craige
Mikasa
Level II

Re: The task scheduler in windows never stop running my script.

When It is running, the JMP window does not open. the only thing I can see is the scheduler window. 

 

Capture.PNG

Ryan_Gilmore
Community Manager Community Manager

Re: The task scheduler in windows never stop running my script.

When I've encountered this issue, I open JMP on the machine then run the script. Often times it will be a preference that is not set the same as on the development machine or a file/directory that is missing which the script assumes exists.

 

Here's an example of a scheduled task I have setup.

 

task.png

Mikasa
Level II

Re: The task scheduler in windows never stop running my script.

Thanaks @Ryan_Gilmore .  I have the same setting but still not working

Ryan_Gilmore
Community Manager Community Manager

Re: The task scheduler in windows never stop running my script.

I would also suggest checking the permissions under which the task is running.

 

My next step would be to create a "hello world" type script then run that as a scheduled task using the same parameters as the one that is not working. If that works, then I would start re-building the script until it fails as a scheduled task.