Skip to main content
Question

FME Desktop returns error code 2 when running from command line

  • November 1, 2017
  • 1 reply
  • 94 views

tfcw
Contributor
Forum|alt.badge.img+1

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
    )
)

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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: