Running a shell mid server file in the mid server

erck
Tera Contributor

 

I have a Mid Server Script File and Im trying to make it run in the mid server. 

 


Mid Server Script File

Name: testfile.sh

#!/bin/sh
echo 'hello' >> test.txt

 

 

Calling it by using MIDServerSystemCommandUtil (OOB)

 

new global.MIDServerSystemCommandUtil().issueSystemCommandToSpecificMID( './testfile.sh' , "MID_SERVER_NAME" , '' );

 

I see the file in the mid server and its trying to execute but in the logs I see:

2025-07-23T18:21:03.741+0000 ERROR (Worker-Interactive:SystemCommand-5139e5af87362e10df30b997cebb35b5) [SystemCommand:299] Unknown System Command: './testfile.sh'

 

Any one run into this ? 

1 REPLY 1

erck
Tera Contributor

also tried 

new global.MIDServerSystemCommandUtil().issueSystemCommandToSpecificMID( 'testfile.sh' , "MID_SERVER_NAME" , '' );