102
Views
5
Comments
Timer
Question

Hello,

I have server action that I want to run using timer. I need the timer to run [it] after the first 30 seconds every 5 seconds (if the timer is to run for 3 mins, I need it to run after the first 30 seconds meaning at 30,35,40,...). How to achieve this?

Edited by a moderator on 02 Apr 2024 at 16:18
2025-03-04 14-45-15
Andre Sousa

Hello Mohamed,

You can check the documention related with Timers, i think that might help you: https://success.outsystems.com/documentation/11/developing_an_application/use_timers/create_and_run_timers/


Best Regards

2024-04-05 11-04-57
Krishnnambal
 
MVP

Hi,

You can use a long running timer and the forge component 'Sleep' to achieve this. Please refer to:

https://www.outsystems.com/forums/discussion/92652/execute-the-server-action-every-5-seconds/

You can make a client side logic to run at a specific interval say 15 seconds, 20 seconds etc , via setinterval() functional in JavaScript.

Please refer to the discussion,

https://www.outsystems.com/forums/discussion/68777/javascript-timer-in-outsystems/


2025-07-31 10-32-21
Vikram garasiya

Hi, @Mohamed Zakaria 

I have one suggestion, you can use one local variable that is invoked time when the timer invoked first store that time in one local variable after use if widget to check difference between current time and invoked time if there is difference of  30sec you can run your logic on interval of every 5sec.


let me know if it works for you or not ? 



 

2024-08-23 16-02-06
Mario Sebastian Abud Gonzalez

You can look at this example @Mohamed Zakaria, adapt it and improve it.

Best regards

TimerDemo.oml
2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

You use a busy-loop to time things, which is generally not a smart way to do things (it takes maximum processor power while achieving nothing).

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.