I see a previous thread about this that is similar...
My batch file looks the same,
like this:
"C:\Program Files\SAS\JMP\9\jmp.exe" "C:\SCHEDULED\MYSCRIPT.jsl"
but I already have exit(nosave); at the end of my script (and have closed all tables and windows). And, if I run the .bat file just by clicking on it, it opens JMP, runs the script and then exits as it should. It's only when I run this .bat file through the Task Scheduler that something isn't right. It appears to not do the exit(). The script does run and do its thing but a jmp.exe is left open - I can see it in the Task Manager though it's otherwise invisible, and the task doesn't move on (the scheduler doesn't say it's complete, it waits until the set max time and terminates the task). so the effect is that my automated scripts are getting their work done but over time more and more JMPs are open until I get a memory error (and if I look in the scheduler history my jobs never finish successfully they all get terminated after an hour or whatever). I tried using tskill in the bat file to close JMP but that didn't help, presumably because it never gets to that step.
I also found I could make the scheduler happy by modifying the batch file to:
start "" "C:\Program Files\SAS\JMP\9\jmp.exe" "C:\SCHEDULED\MYSCRIPT.jsl". Then it doesn't wait fruitlessly for the thing to end, the scheduler thinks it's done after starting up the .bat file, but I still have JMP processes left open. I still can't figure out how to close JMP successfully when I open it in the scheduler. Maybe I can daily run a task that just does task kill on all open JMPs at some odd hour when I don't expect anything useful to be running. But I'm hoping for a cleaner solution.
any thoughts about this?
This is JMP9 and Windows7. And it happens with a variety of different JSL scripts, all of which appear to complete their tasks up to the point of exiting JMP (and do exit JMP outside the scheduler).