I’m new to FME and have (hopefully) a simple question. I have created a workspace that reprojects data from one projection to another in ESRI Geodatabase (sde). I have embedded the connection parameters. The workspace successfully runs.
I have created a batch file, using the command prompt information from the result of the translation log. The batch file successfully runs when executed manually.
When I schedule via Task Scheduler, its fails (0x1). Return code 2147942401
The user account that runs the task is my own username. On local PC. Runs with highest privileges set. Under Action, it points to the location of the batch file.
What am I missing?
Thanks,
Leanne
Page 1 / 1
This is not likely an FME reason, but rather a Windows issue.
Having similarly run a lot of BAT in task scheduler, there are a few traps, mostly to do with authentication and security when task scheduler tries to execute a command when the user is not logged in.
First create a Test.BAT that creates some file output like:
Echo “Hello World!” » C:\Temp\Test.txt
... And check this runs from Windows. Then load this as a Task Scheduler task to be the test routine, and check can run this also through manual run of the Task.
Now for executing on a Schedule, most commonly users will have to set this to run when not logged in, with most Windows configured to auto log out for security reasons after a period of time off no user inputs.
This requires your user name and password to be set in Task Scheduler in this mode but they are some “gotchas” that I’ve run into.
First is that the User Name in a corporate environment needs to be DOMAIN NAME\USER NAME format. Just user name alone won't work.
Second, in a corporate environment, the Group Policy Object (GPO) needs to have been set to allow your user account to execute tasks when not logged in, increasingly this is often being locked down by GPO Admins for security reasons.
I agree with you in that I think this is a windows issue.
Unfortunately I can’t get the suggestion above to work. It runs in windows but not when I schedule via Task Scheduler.