Hi All,
Is there any way to check if there is already an instance of a particular timer run before waking it up from application code side?
Thanks
Hello.
There can't be more than one instance of each timer. By default if you ask it to run, it will be queued to run after the first one finishes.
If you really need to see if it is running you can go to Service Center->Module->Timers or simply to Environment Health and see all.
If you need to see in the code, There is an OS table with that information.
https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Platform_Timers_and_Asynchronous_Processes
Hi there,
You can only have one instance of timer running per environment. So you should not have any concerns for the same timer running twice.
Furthermore, Justin James’ solution post provides some more details.
Regards,
Nordin
EDIT: I now see Nuno already provided the same answer and with even more information.
Thanks, Nuno and Nordin for clearing the doubt. So there can be only one instance running at a time.
Even if we call the wake timer function multiple time, it will be queued.
BeingPandey wrote:
But if you still want to skip calling wake timer just to avoid the repeate execution of your job, you can use Meta_Cyclic_Job and Cyclic_Job (for multi-tenant espace)/ Cyclic_Job_Shared (for single tenant espace) entity from system espace to check if timer is already running.
Documentation link was already shared by Nuno, I have just added links to specific section of the documentation.
And no matter how many times you called it, only one time will be queued.
Hi Nuno,
Only one instance of each timer can run at a time. If a timer is triggered while an instance of it is still running, the new trigger does not start another instance immediately nor does it place it in a queue. Is that right?
And no matter how many front-ends you have in your environment, the timer can only run on a single front-end at a time within that environment.