1
votes

I would like to create a Jenkins job which would trigger Matlab function. It is easy!

C:\Program Files\MATLAB\R2012a\bin\matlab.exe -nodisplay -r "disp('Hello World!');exit"

The question is how to return the matlab command window.

It is of course cool to start some process, but I need to track it. Some of you say probably “.log”. I know, but I want to see it alive in Jenkins console.

Is there a way to achieve it?

2

2 Answers

2
votes

Have you tried calling Matlab with the option -logfile output.log? That should dump the whole Command Window Output into the logfile output.log. See also this link to the documentation.

1
votes

If waiting the matlab process to finish is fine with you, then just add the -wait -log switches:

"%PATH_TO_MATLAB_BIN%\matlab.exe" -nodisplay -r "disp('Hello World!');exit" -wait -log