Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Scheduled activation programatically

sumitc22
Level 4
Level 4

Hi,

I have a requirement for scheduled activation programatically. Can somebody provide some pointer/source code for the same ?

Thanks

Sumit

1 Accepted Solution
Graham_Hutchin1
Correct answer by
Employee
Employee

There are a few ways to do this.

If you need some more help please reply.

View solution in original post

4 Replies
Graham_Hutchin1
Correct answer by
Employee
Employee

There are a few ways to do this.

If you need some more help please reply.

View solution in original post

sumitc22
Level 4
Level 4

Thanks Graham for your reply.

I'm going to implement an OSGI component for this and I have requirement for bulk replication.

 I'm going to use replicator.replicate(), but I need to do it in batches so that It does not put load on our publisher.

How can I pass the date/time value programatically before I activate a batch is my question.

Is it possible to invoke 'chedule_activation' workflow  with a date/time programatically ?

Graham_Hutchin1
Employee
Employee

If this bulk activation is going to happen frequently I suggest that you shy away from workflows due to the overhead that they introduce.  I suggest that you set an activation limit, such as 100, and adjust the frequency that the job runs so to best work within your system constraints.  With each run you will chip away at the number of items that need to be activated.

What do you think?

sumitc22
Level 4
Level 4

Thanks again for sharing your thought.

Yes, I can have two osgi:config property ( one for the number for each batch and timeout value ). Seems that will do 🙂