Both Spotfire Professioanl Analyst and Web Player trigger analysisApplication.DocumentClosing event when a document is closed ... but this does not trigger in Automation Services when a job is finished executing.
TIBCO support provided the following workaround:
"In Automation Services a document is closed, and AnalysisApplication.DocumentClosing is called, when another document is opened using task Open Analysis from Library. Since there is no task for closing a document, opening a new document is the only way to get this event."
This looks strange to me ... so Spotfire needs to either provide a task to close the opened document to force this event to fire, OR automatically close the document when the job is finished.