Run an automation every 5 minutes

Hi all,

The requirement is to run an automation to process PDF files in a directory every 5 minutes. When the time has elapsed, it should check whether the processing is completed. If it is not, it waits for another 5 minutes. I have used a boolean property to indicate whether the processing is completed.

I have used a timer for this scenario, but it does not get triggered properly since I am not using any windows forms. (Pega Robotics 8 - Not able to star the timer manually | Support Center)

Is there any workaround for this? The basic task is to run the automation every 5 minutes.

I am using Pega Robot Studio 19.1.27.0

TIA

You’ll need a WindowsForm to use the Timer. You can set the Opacity of the form to 0 and effectively make it invisible (especially if you hide it from the Task Bar). You want to make sure that the form is “Visible” (i.e. not minimized or hidden where you set Visible to False). With an Opacity of 0, it won’t actually have any pixels onscreen that you can see, but will still be technically Visible, allowing the Click event to fire. Here is an example where I set the timer to five seconds (much easier to test with). I wrapped the automation that does the work in a Try…Catch so that you can ensure it always allows the next interval to work regardless of the outcome of the prior interval. If the time fires while the prior run is still operating, it will simply get ignored and do nothing until the next interval.

Project22.zip (21.5 KB)

Thanks for the reply. I have used a method that only uses the timer and a boolean variable instead of using a windows form.

PFA

Run Automations in a Loop.pdf (122 KB)