Skip to main content
Question

writing python shutdown script

  • November 5, 2015
  • 2 replies
  • 35 views

Forum|alt.badge.img
I am looking to run a python shutdown script and need some help getting started. i am very new to FME and also new to python. My goal is to use database updater tool and then have a email sent out when the database is updated. I wanted the script to first update the database and use the python emailer to email me it is complete. Only issue I found is the databases updater has no out so I cant email once done. So was told about a python shutdown script that could handle that and was curious how to do it. Any help would be great. Thank you.
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.

2 replies

david_r
Celebrity
  • November 5, 2015
Hi

 

 

Since you're new to both FME and Python, I would recommend the following solution rather than using a shutdown script:

 

 

Create a new workspace, insert a Creator and then a WorkspaceRunner. Configure the WorkspaceRunner to execute your database updater. Make sure to set "Wait for job to complete" to Yes. After the Workspacerunner, insert a PythonEmailer.

 

 

When you execute this workspace, it will first execute your database updater workspace, then send out the email once it's terminated.

 

 

All without having had to write a single line of Python code.

 

 

David

Forum|alt.badge.img
  • Author
  • November 5, 2015
Hi

 

 

Since you're new to both FME and Python, I would recommend the following solution rather than using a shutdown script:

 

 

Create a new workspace, insert a Creator and then a WorkspaceRunner. Configure the WorkspaceRunner to execute your database updater. Make sure to set "Wait for job to complete" to Yes. After the Workspacerunner, insert a PythonEmailer.

 

 

When you execute this workspace, it will first execute your database updater workspace, then send out the email once it's terminated.

 

 

All without having had to write a single line of Python code.

 

 

David

Thank you