Skip to main content
Question

writing python shutdown script


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.

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
david_r wrote:
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


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