The Timers are handled by the Scheduler Service. This service checks for timers that are ready to run and executes their actions. A timer is ready to run when the current time is greater or equal to the timer runtime property NextRun.

Since timers usually invoke actions that take a while to run and are processor intensive, the OutSystems Scheduler Service only runs a fixed number of timers at the same time. By default only three timers can run at the same time, but this number can be customized in the OutSystems Configuration Tool.

When more than three timers are scheduled to run at the same time, the timers with higher priority run first. See how priorities are handled.

When the timer action ends successfully, the NextRun property of the timer is updated to the next time that it should be awakened. This time is computed according to the Schedule property of the timer.

If a timer is not executed, if an unhandled exception occurs, or if the action times out, the timer's  NextRun property is not updated. This means that the next time the OutSystems Scheduler Service checks for timers ready to run, the timer will be picked for execution.

Timers Time-out

If the action associated with a timer does not end within a pre-defined time, the action is aborted and the Timer stops. This is considered an error and, therefore, the Timer will be executed again for the number of retries you set in the Service Center (by default it is set to 3 retries). To see how to change the number of retries check the Timers and Asynchronous Processes Technical Note.

By default the time-out is set to 20 minutes, but can be changed by setting the Timeout in Minutes property of the timer. Learn more about the Timeout property.

Sessions in Timers

Asynchronous logic such as Timers and Process Activities run on a separate session. This means that when executing the action associated with the timer, all session variables will have their default value. As an example, the UserId session variable will have the Null Identifier value.

See Also

Wake a Timer | Timer Schedule Editor | Use Timers