I have several scenarios when I need to stop the Notes Agent running. For example, the Agent may get into an infinite loop, or wait indefinitely for an external request to execute. I have tried running the commands :
- tell amgr quit (for Agents running amgr),
- tell http quit (for Agents started via http request). But in any case Agents keep on running and only rebooting Domino server helps.
Is there any way to stop running Agents? The question concerns Agents written both in LotusScript and Java.
In my experience, 'tell amgr quit' and 'tell http quit' usually do work. But only usually. They can hang if the agent itself has made a network call and is waiting for a response. And obviously, they have the drawback of shutting down a lot more than just a single agent.
Apart from that, no, I am not aware of any way to shut down an agent unless you explicitly code it to check something on every N iterations of each major loop. It has to be something that wouldn't be cached, though, so it's going to be expensive, which means you'd better make your N pretty big.