Question

FME Desktop returns error code 2 when running from command line

  • 1 November 2017
  • 1 reply
  • 10 views

Badge

I have several scheduled tasks running FME workspaces from the Windows cmd environment. I determine whether the run was successful by checking fme.exe's return code, which is 0 on successful runs.

This usually works but on rare occasions fme.exe immediately spits out the value "2", and produces no log file at all. I'm unable to reproduce this, but out of ~80 jobs running daily it happens a couple of times a week. My main questions/concerns are: 1. What are the troubleshooting steps for this? and 2. How can I make FME write a log file when this error occurs?

This is how I'm calling FME:

for %%i in (*.fmw) do (
    fme %%i
    if !errorlevel! neq 0 (
        echo "The FME errorlevel was !errorlevel!" >> debug.txt
    )
)


1 reply

Badge

I would first take a look in the Windows Event Viewer at the time of the error to see if there is a message in the application section:

Reply