Skip to main content
Best Answer

Would someone at SAFE be able to show me how to automate an FMW file to start using Python?

  • December 19, 2019
  • 3 replies
  • 66 views

Forum|alt.badge.img

I would like some quick instruction on how to automate the start of an FMW process. The current FMW uses a series of files that it converts based on date (i.e. the date is in the filename). I need a Python script to be able to load those files into the FMW project once a month and then run the conversion process.

 

 

I realize that this would be best done using FME Server...but what I'm trying to do is build a "proof-of-concept" for management here (they will see and understand the pitfalls of automating a desktop process to run indefinitely).

Thank you

Best answer by warrendev

Before my company had FME Server I had setup FME workspaces using Python with Windows task scheduler.

Here are some helpful links to get you started.

 

Windows Task Scheduler with Python

http://theautomatic.net/2017/10/03/running-python-task-scheduler/

Run an FME Workspace using Python

 

https://knowledge.safe.com/articles/1158/run-an-fme-workspace-from-python-using-fmeworkspac.html

fmeobjects.FMEWorkspaceRunner

https://docs.safe.com/fme/html/fmepython/api/fmeobjects/_utilities/fmeobjects.FMEWorkspaceRunner.html

 

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.

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+62
If you look at the top of the FME log file (after running a worskpace) you'll see the command line that can be used to run that job. Have that fire from a Python script (or a task scheduler) and that's about it.

warrendev
Enthusiast
Forum|alt.badge.img+26
  • Enthusiast
  • Best Answer
  • December 19, 2019

Before my company had FME Server I had setup FME workspaces using Python with Windows task scheduler.

Here are some helpful links to get you started.

 

Windows Task Scheduler with Python

http://theautomatic.net/2017/10/03/running-python-task-scheduler/

Run an FME Workspace using Python

 

https://knowledge.safe.com/articles/1158/run-an-fme-workspace-from-python-using-fmeworkspac.html

fmeobjects.FMEWorkspaceRunner

https://docs.safe.com/fme/html/fmepython/api/fmeobjects/_utilities/fmeobjects.FMEWorkspaceRunner.html

 


Forum|alt.badge.img
  • Author
  • December 20, 2019

Excellent answers...thank you very much. I will continue testing and experimenting.