Make it possible to Abort a running timer through Service Center
4911
Views
42
Comments
On our RadarOn our Radar
Service Center
Because sometimes you already know your timer execution has gone bad and you just want to stop it.
2016-04-21 20-09-55
J.
 
MVP
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.
2016-04-21 20-09-55
J.
 
MVP

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

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
Please merge with: https://www.outsystems.com/ideas/1476/stop-timer-that-is-running/
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
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
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
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
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
Please consider the idea of having a button on studio services to stop a running process . Currently this is not possible , and the timer attempt to run 3 times and then stop. Because the case is essentially stop.




Merged from ' Stop timer running processes.' (idea created on 2016-07-27 15:09:10 by Bruno Henrique), on 2017-07-19 10:37:34 by Carlos Alfaro
Stop a timer that is running for a long time

Merged from 'Stop a timer that is running' (idea created on 2014-11-20 23:11:47 by Hugo Jesus), on 2016-07-31 18:55:44 by Goncalo Borrega

Merged from ' Stop timer running processes.' (idea created on 2016-07-27 15:09:10 by Bruno Henrique), on 2017-07-19 10:37:34 by Carlos Alfaro
This is a very good idea. It must be implemented as soon as possible

Merged from 'Stop a timer that is running' (idea created on 2014-11-20 23:11:47 by Hugo Jesus), on 2016-07-31 18:55:44 by Goncalo Borrega

Merged from ' Stop timer running processes.' (idea created on 2016-07-27 15:09:10 by Bruno Henrique), on 2017-07-19 10:37:34 by Carlos Alfaro

Hi,

There is no option to stop executing timer job. Suppose timer job went to infinite loop then we need to restart the IIS Server.

If there is any other alternative apart from IIS Restart, please let me know.

If possible, please add action in timer job details so that easily we can stop the timer.


Regards,

Sunil Mane



Merged from 'Action to stop executing timer job' (idea created on 2017-07-19 09:56:36 by Sunil Mane), on 2017-07-19 10:37:53 by Carlos Alfaro

HI Sunil,

I also had the same problem of no control over timer process once its started , in my code i was iterating through the loop which may have many records and than applying some business over them. What i did to control over the timer i added a site parameter [Stop Timer] which is initially set to N and in every iteration i am checking the value of this site property and processing the record only when it is set to N.

Now if any point i want to stop the timer i go to service center and set the value of Site Parameter  to Y and in my code i am checking if the value is Y i have connected it with End .


Regards

-PJ-

Having a site property is a way to solve it, but:

1. This implies that timer logic works correctly, but what if a need to stop it is exactly because of bad logic - infinite loop or something else, you might even have this property but because of some wrong condition it never gets to it

2. This is additional complication to timer logic which you need to implement (we are already used to "own timeout control with wake up", now this)

2021-07-22 16-16-55
Edgar Ramos
Champion

Hi there,

Have Site Properties (control variables) on the timer that allows to define the number of executions and also to exit in case of need.

Regards.

Edgar Ramos

2016-03-14 11-51-58
Carla Teixeira
Merged this idea with 'Stop timer that is running' (created on 2013-11-04 15:25:15 by Paulo Garrudo)

Without thinking about this it seems a wonderful idea to simply have a way to abort a timer externally.

However it makes more sense to have a controlled shutdown via an external flag such as a site property so that your running task can close down safely AFTER it completes some important action and not just asynchronously leaving possible loose ends.  Of course it is your responsibility to make sure the thread regularly checks the flag and cannot get stuck somewhere.

I have always used a site property as a fail-safe abort for my timer methods although interestingly have never had cause to use it (yet).

This can be done with a site property that is added to the action called by the timer. You will be able to stop the timer by changing the the site property on service center. Although having an external button to do that is a good idea i do think that the current way to do it is the best way. 

Merged this idea with 'Add an option to stop the running timer' (created on 28 Jul 2023 11:48:47 by 亗『ARAVIND』亗)

Can we have one more button here to stop the timer when it is running?

Because if we setup max retires 3 times, then even though we know the error in the timer it keeps on retrying 3 times.

If I have the option to stop timer execution and its retries as a single button, it will be helpful.


Great, idea, but it already exists since 2010, so I will merge it.

Please check if your idea is already posted in the past before creating it.

Merged this idea with 'Option to suspend/Kill a timer' (created on 06 May 2019 07:49:46 by Tushar Panpaliya)

Recently there have been multiple instances where we wanted to stop a timer and there is no option whatsoever . We have put some booleans which we can override using site properties to stop the timer at particular logic snippets. But it's not feasible to use these everywhere. 


So an option somewhere in service center to kill a timer would be VERY useful. 

Very limited control provided over timer execution . it should have been like windows service which we can stop whenever needed. Hope it improves better. 

Changed the category to
Backend
2016-04-21 20-09-55
J.
 
MVP
Merged this idea with 'Terminate a running timer (stuck by debugger)' (created on 18 Oct 2018 07:36:24 by Joey Moree)

Sometimes a developer is debugging a timer, but then forgets about it and closes his service studio. Only to find out that the timer is still stuck in the debugger, in order to resolve this now we have to restart the server. 

I wish to gain the ability to terminate a timer from service center so I won't have to restart the entire server for 1 timer.



This comment was:
- originally posted on idea 'Terminate a running timer (stuck by debugger)' (created on 18 Oct 2018 by Joey Moree)
- merged to idea 'Option to suspend/Kill a timer' on 10 Dec 2020 07:02:59 by J.

I totally agree with joey, its not a good idea to restart the entire server to stop one timer.


Thanks

Rajendra Singh



This comment was:
- originally posted on idea 'Terminate a running timer (stuck by debugger)' (created on 18 Oct 2018 by Joey Moree)
- merged to idea 'Option to suspend/Kill a timer' on 10 Dec 2020 07:02:59 by J.
Changed the category to
Backend


This comment was:
- originally posted on idea 'Terminate a running timer (stuck by debugger)' (created on 18 Oct 2018 by Joey Moree)
- merged to idea 'Option to suspend/Kill a timer' on 10 Dec 2020 07:02:59 by J.

Hi,

I totally agree with the idea and voted for it.

What we currently do is put a condition in each foreach that checks a site property of type boolean.

By default the site property is always true, but if we want to 'kill' the timer, we change the site property to true. We know change site property value invalidates the module, but mostly our timers run in their own module, and the need to terminate a timer does mostly occur during the develop/test cycle.

Regards,

Daniel



This comment was:
- originally posted on idea 'Terminate a running timer (stuck by debugger)' (created on 18 Oct 2018 by Joey Moree)
- merged to idea 'Option to suspend/Kill a timer' on 10 Dec 2020 07:02:59 by J.

Not really sure why this idea is not on the radar. Or if there is a  duplicate thread that has grabbed the attention. A sure pain point dealing with timers in dev. 



This comment was:
- originally posted on idea 'Terminate a running timer (stuck by debugger)' (created on 18 Oct 2018 by Joey Moree)
- merged to idea 'Option to suspend/Kill a timer' on 10 Dec 2020 07:02:59 by J.

Bumping this idea to gain more traction and hopefully it will be on the radar soon. This feature will come handy for long running timers since adding a kill switch will take another deployment.

The idea is good, the reason your bumping this idea not;)

Kill switch only takes another deploy because you forgot it in the first place. 

Merged this idea with ' Implement a feature in OutSystems Service Center to allow the stopping of a running timer.' (created on 17 Sep 2024 05:37:07 by Ayumi Fukushima)

Current Limitations

Currently, there is no method to directly stop a timer that is already running. The only options are to wait for the process to complete or for it to time out. This limitation presents several issues:


1. Emergency Response Challenges

   - If a timer triggers an unexpected error or behaves abnormally, the inability to stop it immediately can lead to broader system impacts. This makes emergency response difficult.

2. Resource Wastage

   - Running timers consume system resources. If a timer is malfunctioning, its continued execution wastes resources and can degrade overall system performance.

3. Operational Constraints

   - The lack of an immediate stop function restricts flexibility during system maintenance or operational adjustments, reducing overall operational efficiency.


Benefits of the Proposed Feature

1. Enhanced Emergency Response:

   - Allowing immediate stopping of running timers via Service Center would enable quick intervention in emergencies, improving system stability and minimizing potential disruptions.

2. Resource Optimization

   - The ability to stop unnecessary or malfunctioning timers promptly would prevent resource wastage, helping to maintain optimal system performance.

3. Operational Efficiency

   - Centralized control over timer operations would streamline maintenance and operational tasks, offering greater flexibility and efficiency.

4. Improved Error Handling

   - With the ability to stop timers as needed, error handling would be more effective, facilitating quicker resolution of issues.


User Interface Enhancements

  - Introduce a feature in Service Center to display the status of timers with an option to stop them. This would provide administrators with a clear view and control over running timers.

- Processing Stop Requests:

  - Develop a mechanism to handle stop requests for running timers, ensuring that current processes are terminated cleanly and without adverse effects.

- Logging and Monitoring

  - Implement logging for timer stop operations to track and review these actions. This would aid in troubleshooting and provide a record of administrative activities.


A common solution is to have a killswitch ( for example a site property ) and check the value regularly during execution of the timer logic, every single loop, or maybe every n loops.

please search ideas, this idea is already posted 14 years ago.