cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically changing the queue execution size

Former Member
0 Kudos

Hi all,

I need to control the number of parallel JOBs according some periods (E.g.: 00:00 until 06:00 -> 10 Jobs and 06:01 until 23:59 -> 5 Jobs).

So, I will try to create a JD based on Redwoodscript and schedule it in the needed time to change the queue execution size to the correct number as informed in the Job parameter.

Can anybody kindly send me an example to how use the method setExecutionSize. I'm using Cronacle V8 M33.27-51134.

I found a very good example in the thread , but it doesn't work in my Cronacle version.... and I donu2019t know how to adapt it to my needed.

Thanks a lot,

Douglas Marques

Accepted Solutions (1)

Accepted Solutions (1)

gmblom
Active Contributor
0 Kudos

Hello,

You can try the following:

{
  Queue q = jcsSession.getQueueByName("<queue name>");
  q.setExecutionSize(new Long(xx));
}

Regards Gerben

Former Member
0 Kudos

Hi Gerben,

I have followed the above process and it worked for me to change the execution size to any numeric value but is there any way I can reset it to "null" ?

I mean the execution size field should be reset to blank.

Regards

Anirban Banerjee

Former Member
0 Kudos

Hi,

Can anybody please help me on the above mentioned issue. Thanks.

gmblom
Active Contributor
0 Kudos

Hello,

Like you said: just pass in null:

q.setExecutionSize(null);

Regards Gerben

Former Member
0 Kudos

Thanks Gerben,

It worked.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Gerben,

thanks a lot for the example!

I was trying the following: "setExecutionSize( 10 );"

Best Regards,

Douglas Marques