Scheduled agent stops executing if Compact is already running on the database

You have a scheduled agent that runs at a set frequency (such as 30 minutes). This schedule agent runs correctly most of the time. If, however, the agent attempts to execute (per its schedule) while Compact is running on the same database, the agent stops running. The agent is also removed from the scheduled queue. (The scheduled agent queue is an internal queue that keeps track of which agents need to run.) The agent is not returned to the queue until Agent Manager refreshes the Cache. By default, the Cache is refreshed at 12 a.m.

Starting with Domino 8.5.2 Fix Pack 3 and 8.5.3, you can use the following parameter to force agent retry despite the Compact:


Workaround for earlier releases
A potential workaround is to restrict the run times of the agent to avoid the interference with Compact.  You can also change the Cache refresh to occur after Compact runs. Changing the agent refresh Cache time in the server doc is recommended to ensure that any agents that encounter the collision are recovered.

The following provides additional technical details on the expected behavior:
If Compact is processing a database while AMGR attempts to search it for agents during Agent Cache Refresh the property DBOPTION_NO_BGAGENT is set.  This flag indicates that the database does not to have any background agents which should be considered for scheduling at this time.  The DBOPTION_NO_BGAGENT property will remain set until AMGR successfully searches the database for agents when the agent Cache refresh takes place or Fixup processes the database.

To determine if the flag has been set for a database you can use the following parameter in the Domino server's notes.ini:  debug_amgr=l (lowercase L)

The following will appear in the log:

"AmgrDbg: CheckDbForTask - Setting DBOPTION_NO_BGAGENT for database "

When the flag has been cleared by the Cache refresh or Fixup the following entry should be observed:

"AmgrDbg: CheckDbForTask - Clearing DBOPTION_NO_BGAGENT for database "

The information above is from TN 1084223