My FME Workbench has a python startup and shutdown script (Esri ArcGIS 3.6 python interpreter) that works fine when running in the software or in command line with arguments.
When I put the workbench on a windows task scheduler, the workbench does not run and I get a 0x1 error in task scheduler. If I remove the python startup/shutdown the job runs fine on scheduled task.
Any ideas on how to resolve this? Thanks in advance!
Command line to run workspace: "C:\\Program Files\\FME_64\\fme.exe" "D:\\SOE\\FME Workbenches\\GRI\\GRI_Guardrail_AssetID_Creator.fmw"
Python Interpreter: Using Python interpreter from `C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\python36.dll' with PYTHONHOME `C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3'
Best answer by sashal
Can you be more specific on how you did it?
Sure. Here all of the things a few things I did to get things working:
Set the python interpreter in the Tools menu to the python home path and dll file (noted above)
Use 64 bit FME Desktop - since the python interpreter used was the ArcGIS Pro python interpeter (because were were using attribute rules we needed that python interpreter)
Made sure that the user that is running the schedule task has access to the .fmw files (right click fmw file - properties, security)
Used the newer version of FME Desktop which has bug fixes to use the ArcGIS Pro Python interpreter
Also, when I moved the FME Workspaces to FME Server, I had to do the following:
Make sure FME Server Windows Service is running with a windows AD account
On the Server that is hosting the FME Server software
Make sure ArcGIS Pro is installed and licensed on the Server that is hosting the FME Server software
Make sure that the account that is running the FME Server Windows Service has access to the python interpreter (python home) `C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3'
I hope this helps!!
-Sasha
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.
Sure. Here all of the things a few things I did to get things working:
Set the python interpreter in the Tools menu to the python home path and dll file (noted above)
Use 64 bit FME Desktop - since the python interpreter used was the ArcGIS Pro python interpeter (because were were using attribute rules we needed that python interpreter)
Made sure that the user that is running the schedule task has access to the .fmw files (right click fmw file - properties, security)
Used the newer version of FME Desktop which has bug fixes to use the ArcGIS Pro Python interpreter
Also, when I moved the FME Workspaces to FME Server, I had to do the following:
Make sure FME Server Windows Service is running with a windows AD account
On the Server that is hosting the FME Server software
Make sure ArcGIS Pro is installed and licensed on the Server that is hosting the FME Server software
Make sure that the account that is running the FME Server Windows Service has access to the python interpreter (python home) `C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3'