João Melo
mvp_badge
MVP
Run timers programatically
1090
Views
9
Comments
Implemented
Backend
OutSystems 5.0

It would be goof if we could run timers via dinnamicaly via code, programatically. Something like an Action receiving a timer name as parameter.

Hi João, 

You can do it programmatically by invoking the WakeTimer action. Every timer exposes that action. Doesn't that fullfi your purpose or were you looking for something else?

Cheers,

EMS
João Melo
mvp_badge
MVP
Yes, but it's not dinamic. I want to develop a screen where I can manage every "important" timer of my app. With waketimer, I have to edit this screen every time I create a new timer.
Nuno Rolo
mvp_badge
MVP
Hi João,

Still possible, you just have to get the list of timers from the entity Meta_Cyclic_Job from System.
João Melo
mvp_badge
MVP
Ok, but how do I run the timer, Nuno? Like the "Run now" button in Service Center's Timers Screen.
Nuno Rolo
mvp_badge
MVP
Well you have to join with cyclic_job_shared and then you set the Next_Run to the DateTime you want.
João Melo
mvp_badge
MVP
Wow.. I didn't realize this!! I can't believe it. Really thank you folks.


As Nuno Rolo explained it's possible updating the system tables, nevertheless, would be nice to have one system action to provide that functionality.

Pramod Jain
mvp_badge
MVP

There is a document about Timer which has all the information about what table\entities Timer uses . You can simply control those entities and provide a interface to insert update your job details.


Regards

-PJ-

Pramod Jain
mvp_badge
MVP

There is a document about Timer which has all the information about what table\entities Timer uses . You can simply control those entities and provide a interface to insert update your job details.


Regards

-PJ-