Support Article
Standard agent runs repeatedly not taking the schedule
SA-21354
Summary
When a standard agent is configured to run periodically and based on a condition will re-queue the same work object back to itself, the re-queued item is picked up immediately instead of waiting for the next interval on the agent schedule.
Error Messages
Not Applicable
Steps to Reproduce
- Create a standard agent with Periodic schedule.
- Create an agent activity with a condition that if not met will cause the case to be re-queued to this agent.
Root Cause
An issue in the custom application code or rules.
Resolution
Here’s the explanation for the reported behavior:
This is the expected behavior as the re-queue configuration used makes the queue item available immediately to an actively running agent which will pick up the new queue item before going to sleep and waiting for the next period. To avoid this sequence, place an allotment of time in the MinimumAgeForProcessing field for the method queueforagent as described on the following PDN article: https://pdn.pega.com/about-queue-agent-method. This will cause the queue entry to not be available until the agent goes to sleep and won't be picked up until next run time.
Published March 25, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.