Support Article
Agent next run time does not get updated
Summary
The agent fails to process a queue item due to an exception. The user restarts the agent. However, the next run time does not get updated to the future date time when it must be running according to the agent schedule. The issue occurs post upgrading Pega 7.3.1 to Pega 8.2.1.
Error Messages
Not Applicable
Steps to Reproduce
- Create an advanced agent with the Recurring pattern
- Configure the advanced agent to run once a day at a particular time
- Force fail the advanced agent so that it stops running with an exception
- Restart the agent after the next run time has passed
- Verify if the next run time is updated
Root Cause
A defect in Pegasystems’ code or rules. When an advanced agent fails on an environment where node classification is enabled, the agent is not disabled and the same execution pattern object is used on restart. The last execution time is stored as the date on which agent ran and failed in the same execution pattern object. Hence, the next runtime is computed based on this last execution time on performing a restart.
In environments where node classification is not enabled, the agent schedule gets created based on the nodeId. When the advanced agent fails with an exception, the agent is disabled on that node. Hence, on restart the user enables the agent and resets the execution pattern object. As a result, the next runtime is computed freshly with no last execution time.
Resolution
This issue is addressed in the Pega 8.2.5 patch release.
Alternatively,
Perform the following local-change:
- Open the Agent rule that is affected
- Go to the Nodes tab in the Agent rule
- Open the Agent Schedule rule from the list based on the node classification of the Agent rule
- Resave or delete the Agent Schedule rule (If there are no specific changes in the Agent Schedule rule)
- Wait for 10 minutes for the Master agent to pick the change or restart the application server to affect this change
Published April 16, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.