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?
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.
From my experience, if the script runs outside of the scheduled task, then I would check the following:
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,
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:
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...
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?
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?
When It is running, the JMP window does not open. the only thing I can see is the scheduler window.
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.
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.