Hi all,This is the case:
I’ve written an application which collects a lot of information from all mailfiles in the company. One agent runs on each server in the weekend and creates an overview of the buildup of a mailfile in time. As there are quite many huge mailfiles on the server this agent won’t complete within its time limit (error: Agent did not complete within the time limit). This is not a problem as the next time the agent runs (it runs every hour in the weekend) it will pickup where it left and continue.
We have one server where this agent crashes the server. This is probably caused by multiple corrupt mailfiles. However, I therefore need a mechanism to detect whether the agent timed out or whether agent stopped running because of a server crash, so in the latter case I can send a warning mail to an application manager and not continue.
I can’t access the agent log through LotusScript to look for the magic “did not complete” error message, which was my first guess. Second I hoped to be able to write some code in the Terminate sub as this sub is supposed to be executed even if the agent times out. However, this seems to be rather arbitrary. Sometimes it executes the code in the terminate sub right. Sometimes it creates a new logdoc (I let it write to a document in the same database which contains run info for the agent), sometimes it doesn’t execute at all (in which case usually also the “did not complete” message is not to be found in the agent log.
Does anyone know of a robust method to identify whether an agent run was cancelled due to a timeout or due to a server crash?