How to make single agent to run at different time frequency based on business and non business hours
We have a requirement to run an agent for 60 seconds during the business hours 8 to 5 and for every 5 minutes during non business hours, How we can achieve this using single agent?
***Edited by Moderator Marissa to update platform capability tags****
If I have understood your requirement correctly, logically you need to maintain two queues -
1. one for tasks created during Business hour that needs to be processed almost immediately (max delay is 60 secs).
2. one for tasks created during non-Business hour that needs to be processed with 5 minutes delay.
In that sense, you need two agents anyway, from logical point of view, as single agent can follow a single queue.
If you still need to utilize one single agent (that will run in every 60 secs, irrespective of business or non-Business hours) you can programmatically add delay (min processing age field in Queue-For-Agent method) when queuing the task, created after the Business hour.
Though it will meet your requirement but this is not the recommended way to do it, as agent will use up resource even in non-Business hours as frequently as it does during Business hour.
Keep up to date on this post and subscribe to comments
- How to make an agent runs exactly at specifc time with multiple times a day?
- Agents throwing IndexOutOfBoundsException exception while ran but while manually running the activity- it works fine. Have a question for below, 1) Need to run an agent to be run 3 times on particular time schedule- same activity?? How??
- How to schedule agents to run at off hours
- Agents don't run on their scheduled times, until or unless we do manual restart of the agents. After the restart also, they won't run automatically.
- How to calculate business days based on specific calendar time zones.