Schedule trigger outage

I have a need to schedule outages on particular triggers over a period of hours from time to time. Looking at the information for Fix 22 that was part of IS_SP1 there were 4 trigger services which give you the programmatic ability to suspend and resume document retrieval and processing of a trigger. The one further issue I need to resolve is to never process any documents queued while the trigger is suspended. The behavior of the resume services to start processing all the queued document during the time the trigger was suspend.

This left me with 2 approaches,

One to find a programmatic way of disabling and enabling the trigger (This seems to only be possible via Developer) and then creating a scheduled tasks for those services.

And two, to write 2 services, one that suspends retrieval and processing and schedule that one. Then the second service to resume document retrieval and processing, but first clear the client queue, so all queued documents would be thrown in the proverbial “bit bucket”.

Any suggestions would be appreciated.

Steve,

Long time no see. Welcome back.

Do you want to automate the process of discarding documents from the broker queue corresponding to a suspended trigger? If so, you’ll have to write a java service that uses the Broker’s AdminClient API to do the heavy lifting.

Mark

Hi Steve - Regarding your second issue, if you know the time after which you want to resume processing documents, you can set a timestamp in repo server (or memory if you are not in a clustered environment). Say for example you want a trigger to resume processing documents that were published after 5pm, check the timestamp of the document against this repo setting (5pm). If the doc was published after 5pm, you process it and if it was published before 5pm, then EXIT successfully.

HTH,
Rajesh