Question

How to make single agent to run at different time frequency based on business and non business hours

Hi,

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****

Correct Answer
December 11, 2019 - 11:31am

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.

Comments

Keep up to date on this post and subscribe to comments

December 10, 2019 - 2:54am

Hello,

It might be just easiest to work with two agents then no? What is your Pega version?

December 11, 2019 - 2:00am
Response to MarcLasserre_GCS

Hi, 

Version we are using 7.1 , yes we can achieve it by 2 diff agents but will it not be possible with a single agent? 

 

December 11, 2019 - 9:41am
Response to PavanKumarP0016

Well, 

Maybe you could but will it be more flexible and build for change in the future?

December 11, 2019 - 11:31am

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.

December 12, 2019 - 12:57am
Response to N.SenSharma

neat explanation , thanks.