We have an application where we changed timer schedule in runtime, it was pretty easy to do in O11. But turns out that's not possible in ODC, contrary to what this page, information supposedly updated in May 2024, says.And while you could easily access the Timer table in O11, most of the System module tables do not exist in ODC either so I have no idea what to do. Does anyone know a way to dynamically change timer schedule in runtime?
I keep running into things that used to take a minute or two to implement that are outright impossible in ODC.
They just confirmed that you cannot change a timer's schedule programmatically. We came up with the approach I described above, which we think is the best we can do at the moment with the tools available to us. It also turned out to be good enough for our customer.
Hi @Mehmet Taha Aydin ,
that is probably a copy paste error in the ODC documentation, i will report it, but whenever you see an error in documentation, you can also report by giving feedback on that page.
The most simple / rudamentary approach, is to have your timer running on a schedule that you think should be the maximum interval for sheduling it (such as every minute or every 5 min).
Then have your own schedule entity, where you manage the real schedule you want it to run on. Every time it starts, check your own schedule, if not supposed to run yet, finish without doing anything.
Dorine
I already gave feedback on the page, I wanted to ask about alternatives (and vent a tiny bit about ODC to be honest).That's such a brute force solution, but I guess that's where we are now. Thank you.
Hi Mehmet,
I'm also using timers in an ODC project, and just like you I was very confused by that documentation. We reached out to OutSystems, and indeed, it is a mistake. Currently, it is not possible to change the timer's schedule programmatically.
In our project, the customer can set a specific time for something to happen in the application. The way we ended up solving this was pretty much what Dorine described: we have set the timer to run every 5 minutes (the smallest possible interval for a timer) and, when it runs, we check if there's anything scheduled for the next 5 minutes. So when the timer runs at, say, 13:00, we check if there's anything scheduled between 13:01 and 13:05. When it runs again at 13:05, we check between 13:06 and 13:10, and so on.
Was that suggested by Outsystems? Or did they just say "Sorry, it's impossible now" and leave it there?
That's good to know. Thank you.
Hi @Mehmet Taha Aydin and @Aurelio Junior apologies for the incorrection in the documentation. We've removed that part.
Thank you @Dorine Boudry for bringing this to our attention!