Make it possible to Abort a running timer through Service Center

By João Pedro Abreu on 13 May 2010
Because sometimes you already know your timer execution has gone bad and you just want to stop it.
J.13 May 2010
Not used timers alot, but throwing an exception will not abort the timer? At least the code will has to provide some logic to abort the whole thing when something is amiss.



Hi Joost!
Like you said, the timer can be easily aborted by throwing an exception, or by an End, in it's own logic. What can't be currently done is to abort a timer that is running without errors, but is taking too long. This can be particularly nasty if you have a timer that restarts itself when it's near a timeout.
J.13 May 2010

Ah ok, now I understand the idea better :)


This would be a great one!

In the worst case now you need to restart the IIS but Server Center doensn't always show the proper information about it (shows it's still running, even if the timer is killed).

Would be a great option if this could be done in Service Center, some kind of 'Master' kill switch
Remco Dekkinga5 Jul 2010

A button or a link in the Service Center that can be used to stop timers.

When testing, you can see that a timer is working, but it's doing something wrong. When you want to fix the problem and stop / restart the timer, it's not possible. You have to wait for the timer to finish.


Merged from '[ServiceCenter] Stop-button for timers.' (idea created on 2010-07-05 09:10:15 by Remco Dekkinga), on 2010-07-08 16:44:52 by Paulo Tavares

For development situations you can use a handbrake : include an if in the timer loop (if there is one) and check for some site variable like TimerHandBrake. If the thing is set jump out of the loop and stop timer action. So while running the timer and you want to break it just Switch on the 'handbrake' and the timer stops.

regards,
Wim


Merged from '[ServiceCenter] Stop-button for timers.' (idea created on 2010-07-05 09:10:15 by Remco Dekkinga), on 2010-07-08 16:44:52 by Paulo Tavares
Justin James28 Aug 2014
Please merge with: https://www.outsystems.com/ideas/1476/stop-timer-that-is-running/
Paulo Garrudo4 Nov 2013
When we have a timer that is running, for too longer or not, sometimes is necessary to stop it.
Currently is not easy to do it, and is always outside the platform, but it would be very nice to have an option inside the timer page with an option to stop it (like a timeout reached).

Regards,
Paulo Garrudo


Merged from 'Stop timer that is running' (idea created on 2013-11-04 15:25:15 by Paulo Garrudo), on 2016-07-29 16:29:16 by Carla Sofia Teixeira
Justin James5 Nov 2013
Paulo -

My workaround is to have the timer check something on each iteration of the loop (sinc a long-running timer is usually iterating over a list), like a site property or a database variable, and use that as a signal to stop, and then reset that variable when it starts again. Old trick from the days when I did a lot of multi-threaded work.

J.Ja


Merged from 'Stop timer that is running' (idea created on 2013-11-04 15:25:15 by Paulo Garrudo), on 2016-07-29 16:29:16 by Carla Sofia Teixeira
Hi guys,

I do the very same thing as JJ, nowadays.

However, this implementation would offer further control over timer logic. Something someone new to the platform would not comprehend why it's missing.

Cheers,
Pedro


Merged from 'Stop timer that is running' (idea created on 2013-11-04 15:25:15 by Paulo Garrudo), on 2016-07-29 16:29:16 by Carla Sofia Teixeira
Justin James6 Nov 2013
Pedro -

So true. Luckily, that list of "things a newcomer would not believe are missing" has shrunk quite a bit. :)

J.Ja


Merged from 'Stop timer that is running' (idea created on 2013-11-04 15:25:15 by Paulo Garrudo), on 2016-07-29 16:29:16 by Carla Sofia Teixeira
Justin James28 Aug 2014
Please merge with: https://www.outsystems.com/ideas/122/make-it-possible-to-abort-a-running-timer-through-service-center/

Merged from 'Stop timer that is running' (idea created on 2013-11-04 15:25:15 by Paulo Garrudo), on 2016-07-29 16:29:16 by Carla Sofia Teixeira
João Gomes24 Oct 2014
I have pretty much the same problem. Here's my use case:

In my application, the user can access a web screen that lists data to be synchronized with external systems (through web services). This can be a lengthy operation since that user can select from 1 to 1000 (or more) items to synchronize.
To avoid http timeouts and give some feedback to the user, the 'synchronize' button uses an Ajax action to store the IDs of the items to be synchronized in a queue and wakes a timer that will process this queue and send the ws messages.
The user is then given feedback of how many items are left to be processed in a message that keeps refreshing.
I need to add a button to cancel the synchronization process, stopping the timer. I will use the solution suggested by Justin and Pedro, but it would be better if there was a built-in action that would just stop the timer.



Merged from 'Stop timer that is running' (idea created on 2013-11-04 15:25:15 by Paulo Garrudo), on 2016-07-29 16:29:16 by Carla Sofia Teixeira