Question

Running a BAT file on Desktop & on FME server

  • 20 December 2022
  • 1 reply
  • 41 views

Badge +1

Hi All,

I've been having a lot of issues trying to get code execution on FME server via System Callers. Been through every forum post about this without success.

 

I've attached a workspace that I'm using to create BAT files and run them with System Caller. SystemCaller 1 and 2 will run on desktop, but not on the server.

The server log shows:

Failed to Execute `"C:\\ProgramData\\Safe Software\\FME Server\\resources\\system\\temp\\engineresults\\b80d9262-f6b1-4c81-8f97-a505f68c95b2\\TauDEM_Run01.bat"'

Failed to Execute `"C:\\ProgramData\\Safe Software\\FME Server\\resources\\system\\temp\\engineresults\\b80d9262-f6b1-4c81-8f97-a505f68c95b2\\TauDEM_Run01.bat" abc'

SystemCaller 3 and 4 will fail on desktop and server.

 

At this point i'd be really keen for a workflow that Bypasses the System Caller. I'm really happy with the BAT file being created, but executing it on the FME server is proving way too hard.

Maybe a python script that can Call the BAT?


1 reply

Userlevel 4

You can use a PythonCaller using e.g. subprocess.run() to execute a batch file.

https://docs.python.org/3/library/subprocess.html#subprocess.run

Reply