Skip to main content
Solved

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

  • December 19, 2019
  • 3 replies
  • 20 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

 

View original
Did this help you find an answer to your question?

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+49
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+23
  • 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.


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