I'm trying to figure out how to create a Windows batch job to run a MATLAB function using Hudson/Jenkins. I haven't seen much information about this so I was wondering if anyone else has tried it.
I have a batch file that mounts the drive where my MATLAB script lives, creates a command line for MATLAB, and starts my script. Right now my script is very basic, it creates a figure, saves it and then exits MATLAB. The command line looks something like this:
matlab -noFigureWindow -nosplash -minimize -wait -r "cd C:\myDirectory; startup; myScript; exit"
I start it in Jenkins like this:
start /B /WAIT C:\myDirectory\run_matlab.bat
I can see my script running on the Jenkins console, see that the drive has been mounted as requested and see from the Task manager that MATLAB is running, but nothing else happens. The function should take less than a minute to run, but after several minutes nothing happens and I need to kill the job.
Does anyone have any experience with running MATLAB from Jenkins on a Windows slave? I need to run this function on Windows so UNIX is not an option.
Thanks in advance.