Question

writing python shutdown script

  • 5 November 2015
  • 2 replies
  • 9 views

Badge
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

Userlevel 4
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
Badge
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

Reply