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
ScriptingRe: The task scheduler in windows never stop running my script.If you run the 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...
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 pathRe: 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?
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.!
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?
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.

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.

Re: The task scheduler in windows never stop running my script.Thanaks @Ryan_Gilmore . I have the same setting but still not working
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.
Re: The task scheduler in windows never stop running my script.Thanks Ryan
I tried for "Hello" scrip. JMP came up but gave me this error for the script path. I changed the path to make sure it is not an issue but got the error again.
Unable to open file "C:\Users\....".
Unknown or ambiguous data source.
Re: The task scheduler in windows never stop running my script.googling for "Unknown or ambiguous data source" yields two hits, this one and https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/td-p/689/page/2 which suggests something is wrong with the file association for the extension you are using.
The file should be a .JSL file. You might also go into preferences and try resetting the file associations (the window specific section in prefs.)
We really need to see good pictures of what you are seeing. I'm also unclear why you think JMP is still running when there are no JMP windows open.
Re: The task scheduler in windows never stop running my script.Thanks @Craige_Hales
I learned that when I only have ("Run only when user in logged in), the JMP window pumps up and the gives me the error for ambiguous data source. But when I end the running, it askes me to Exit JMP snd close everything itself.
I reset the file association too but still the same.
I checked the script and they are jsl.
If I mark (Run whether is user is logged in or not") it only shows me Running and no JMP window opens.
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.
Re: The task scheduler in windows never stop running my script.I am having a similar issue trying to run a JSL script in Windows 10 using JMP 14.3. A script that runs in less than 1 minute when manually triggered within JMP times out in Task Scheduler with Event ID 329 (timeout) after 1 hour. I have tried first opening JMP and then opening the script in the Task Scheduler Actions, but this does not resolve the issue. Any help will be appreciated!
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,
Re: The task scheduler in windows never stop running my script.Thanks, Ryan.
I tried running the same scripts using System Scheduler. Task Scheduler would open the task and time-out; System Scheduler provided me with a more descriptive error message. The company I work for synchs all our files on the cloud, and these files could not be opened through either scheduler app. When I moved the files directly to a hard drive location that was not synched to the cloud, the script ran fine in System Scheduler.
So, it did appear to be a permissions issue.