Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I find out if an agent is currently running

Status
Not open for further replies.

domino1352

IS-IT--Management
Nov 20, 2002
40
AU
I have an agent set to run every 3 hours, I would like to run it more often say avery hour, But now and again the run time takes over 2 hours


Is it possible to check if the agent is already running?
 
You can lock an agent during its execution.
As such, you can check if the lock is in place first. If yes, you end the execution. If not, you lock the agent and continue processing.
Remember to unlock the agent at the very end of the code, and use error handling to ensure that the agent does not bomb out and remain locked.
Check out Locking in the Design Help for some ideas.
You might also want to check the server parameter
Code:
DominoAsynchronizeAgents
to be sure what you are doing is possible. If this parameter is 0, I believe you cannot run the same agent more than once in a given time frame. If so, your problem might already be solved.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top