How to correctly stop a timer from executing while it is running


How to correctly stop a timer from executing while it is running

Hello all

We frequently get this question at OutSystems Support: how do I stop a timer that is running in my system before it reaches the end.

The short answer: restart the application server (IIS / JBoss / WebLogic) where the timer is running. Take the following into account:
  • If your system is a farm, identify in Service Center (under Monitoring > Environment Health) which front-end is running your timer, and restart the application server in that server alone;
  • If you are stopping a timer you probably want to prevent it from starting right afterwards. So before stopping it, make sure to deactivate its execution in Service Center.
  • This will cause downtime of your system. Restarting the application server can take from seconds to minutes depending on how loaded it is. Only do this if really needed.
    If you are running IIS, you can minimize downtime by recycling the app pool that holds the timer rather than restarting IIS.

The explanation

Timers in the OutSystems Platform are web-service calls to a special web-service in the eSpace. The web-service caller is Scheduler Service, and the whole business logic is running in the application server. There is nothing implemented in either the OutSystems Platform or in application servers that allows a global abort of a web-request, so at the moment the only possible option to terminate one such request is killing the whole process running it.

For more context on this, please make sure to read the documentation on timers and asynchronous processes.