Stop a timer

  
Is there any way to stop a timer?

I was running a timer in debug mode and I know its timeout is ignored in that mode. However, I stopped the debugger, closed browser page where the debug was running.

The timer was (apparently) still running.

The timer had a timeout of about 500min, but I couldn't wait that long. I tried stopping the Outsystems services and preformed an iisreset, with no results.

Eventually I ended up restarting the machine (fortunately I had that option). It was an extreme measure, but it got me wondering: is there any way to abort a timer once he gets "stuck"?

EDIT:
Well...not even the restart did it! The "Duration" field of the timer is still counting! :|
And I can't run the timer again... Is it really necessary to wait for the timeout?
Hello Ricardo,

I once had a similar problem with an endless loop (the timer would wake itself indefinitely). I tried to disable the timer in service center but it kept running.

I think what worked for me was republishing the eSpace current version.

Maybe you'll also have to update the Next_Run on the database in order to avoid the timer to be scheduled to run again after the publishing process has endend.
I republished the current version, but it didn't work :|

Thanks though
Solution
Hi Ricardo,

The information about the "duration" of the timer execution displayed in Service Center is computed based on the ossys_cyclic_job.is_running_since system table. The scheduler service is responsible for the maintenance of the coherence of this table (based on the timers that executes).

On the other hand, a timer request is simply a web service request executed by the Scheduler Servicer to your application (the web service is internaly generated by the outsystems platform).

From this information you can deduce two things:
1. If you restart IIS, the timer stops (as a timer is simply a web service request, this means a iisreset will definitely kill your timer execution).
2. If the information about the duration in the Service Center appears wrong even after an IISReset and a Scheduler Service restart, this means that somehow the information in the system table became inconsistent on the database (i.e. the scheduler service was not able to update the ossys_cyclic_job.is_running_since timer entry correctly). To correct it you can run the timer again (so that the scheduler service corrects it).

Best regards,

Daniel Lourenço
Solution
Hello all and Daniel...

Your answers  may all be correct but somethimes in Outystems none of those methods work to reset the timer. You really have to go to the database to the tables OSSYS_CYCLIC_JOB or OSSYS_CYCLIC_JOB_SHARED (depending on if its multi tenant or not http://www.outsystems.com/forums/discussion/14792/difference-between-system-tables-for-scheduler/) and kill the job erasing the field in "IS_Running_BY" collumn and placing a zero at the field in "NUMBER_OF_TRIES" Collum".

Be careful anyway this is not supported or recommended by Outsystems (since it's changing the database), but it works!! For me it was the only way...

For other nicer way to avoid to do this we have to wait for Outsystems to implement something like is suggested in the page 
https://www.outsystems.com/ideas/122/make-it-possible-to-abort-a-running-timer-through-service-center



I Forgot to say...You Should erase the field "IS Running_Since" also (maybe even more important)...
You corrected forgetting to say something after almost exactly four months? Wow... And that after you already necroed this thread after more than seven years...
I had this issue again. I saw the post again and it wasn't the complete procedure I have done. Doing the right thing is never wrong...

Thank you for answering after 7 years and 4 months
Recently our practice is to have daily timers running small portions.

let's say you have 100 records to process.
then we do 10 and call the timer again.
but the first action in the start will be "UseKillSwitch"-boolean, so we always can kill a timer when needed.
that boolean can be a database or a site-property ofcourse.