MATLAB commands not executing on Jenkins agent machine

2 ビュー (過去 30 日間)
Sharan Patil
Sharan Patil 2020 年 7 月 29 日
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

回答 (0 件)

カテゴリ

Help Center および File ExchangeReinforcement Learning についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by