Effacer les filtres
Effacer les filtres

MATLAB commands not executing on Jenkins agent machine

3 vues (au cours des 30 derniers jours)
Sharan Patil
Sharan Patil le 29 Juil 2020
Hello,
I am trying out Jenkins Master-Agent configuration. I want to trigger a MATLAB script that reads a text from .txt file and writes it to a excel file. Below is the MATLAB script written in Testmat.m:
addpath('C:\Slave_Node')
fileID = fopen('Test1.txt','r');
formatSpec='%s';
A = fscanf(fileID,formatSpec);
fclose(fileID);
xlswrite('testdata.xls',A);
The batch script in Jenkins Pipeline to trigger the above Testmast.m file is:
bat label: '', script: '''"C:\\Program Files\\MATLAB\\R2015b\\bin\\matlab.exe" -wait -sd "C:\\Test_Excel_Sharan" -r "restoredefaultpath;addpath(genpath(\'C:\\Test_Excel_Sharan\')); "run('C:\\Test_Excel_Sharan\\Testmat.m');quit force,end" -logfile "log_new.txt"'''
Both scripts work as expected on master machine, but when i run the above scripts on agent machine, Jenkins returns below error:
ERROR: script returned exit code 3
I am not if the issue from MATLAB or Jenkins.
Any help to resolve this issue would be appreciated.
Thanks,
Sharan

Réponses (0)

Catégories

En savoir plus sur R Language dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by