Skip to main content
Question

FME Desktop returns error code 2 when running from command line

  • November 1, 2017
  • 1 reply
  • 57 views

tfcw
Participant
Forum|alt.badge.img+1
  • Participant

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

Forum|alt.badge.img
  • November 1, 2017

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:


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings