Timers Default Timeout

Hi All,

I have one query on Timers, the default timeout of the timer is 20 mins we can change it via service center or studio manually. Suppose consider a scenario if the timer is running more than 20 mins is there any possibility to increase the default timeout at run time so the timer can re initialize itself and it should pick only the unfinished process from the previous execution.

Hello Saravanan,

You can set your timeout in service center:

But, look this example, may help you build a better timer:

(Set your current id in site property, and when the timer reset, the select will get next clients.)


About Timers, look this article:

https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/BPT_-_Automatic_Activities_Timeout

Regards.

Hi Saravanan,

We cannot change the timeout at runtime (i never did that)  , however as per the best practice you should not exceed its time by 20 minutes rather handle it in a way within your code so that if your timer reaches the 20 minutes time stop the current operation gracefully and reinitiate the timer again.

To do this you have to keep some logic like one variable which will be initiated with the current time when the timer started and than check this variable within your logic with the current time before you do some operation and than if it reaches to the 20 minute time (may be at 19th minute ) you can stop your operation and launch the same timer again.

You also need to maintain how much data you processed by keeping some flag so that when you start the new timer instance it will start from where you left it in the last run.


Regards,

-PJ-

There are two ways to do this. 

  1. Implement some loggin and manual commit. Also you have to create multiple timers (with same action) with a time gap higher then your set timeout so that if process timeout occurs then next timer can check the logs and continue from where previous timer left the job. For example if your timer is archiving records from entity to external database and there are millions of records then you can move them in chunks and keep logging number fo records processed.
  2. Another better way to do this is break your timer in small parts and run them sequentialy. This is usefull in cases where your timer is doing multiple jobs sequenntially. So in this case you can difide them in mltiple actions and call them in separate timers sequentially.
Solution

Also please go through the tutorial link , it will help you understand how to implement timer in a best way so that it wont exhaust( see the last 29 minutes covering timer best practices)


Regards,

-PJ-

Solution

Pramod Jain wrote:

Also please go through the tutorial link , it will help you understand how to implement timer in a best way so that it wont exhaust( see the last 29 minutes covering timer best practices)


Regards,

-PJ-

Sure Pramod. Thankyou, for the Info i will lookout for the best implementation