Run timers programatically

By João Melo on 14 Jul 2015

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

Elísio Simão14 Jul 2015
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 Melo14 Jul 2015
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 Rolo16 Jul 2015
Hi João,

Still possible, you just have to get the list of timers from the entity Meta_Cyclic_Job from System.
João Melo16 Jul 2015
Ok, but how do I run the timer, Nuno? Like the "Run now" button in Service Center's Timers Screen.
Nuno Rolo17 Jul 2015
Well you have to join with cyclic_job_shared and then you set the Next_Run to the DateTime you want.
João Melo17 Jul 2015
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.

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-

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-