Hi,
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
Based on the above statement, if a timer is scheduled at 12PM daily and what happens if an unhandled exception occurs, by default 3 retries will be there for each timer, will it try to execute 3 times or it'll call next day at 12PM?
what does that mean, Next time the Outsystems Scheduler Service checks for the timers ready to run, the timer will be picked for execution.
Thanks,
Sai.
Hi jeevan
You can refer the Outsystems official documentation.
https://success.outsystems.com/documentation/11/reference/outsystems_language/processes/timer/
Regards
Krishnanand Pathak
Hi Jeevan,
When timer fails due to timeout or any unhandled exception, it next run will not be updated so scheduler service will pick it again until it fails for 3 times timer will be deactivated automatically until development or support team check the issue, fix it and then activate time again manually.
So for your example if timer next run is 12 PM, it will start 12 PM then fail after 2 or 3 minutes for example but its next run will remain as it is 12 PM so scheduler service when check for timers that their next run are due it will pick same timer again and so on for 3 trials.
You seem to contradict yourself in the two paragraphs, but to be clear: a timer that has failed the maximum number of times (it's 3 by default, but it is possible to change this, for example on all our non-prod environments we've set it to 1), will be scheduled to run at the next run time.
As I've written in my article on timers, the next run date is calculated when the timer is started, not after it finishes. So the OP's premise is false, and your explenation is (at least partially) false as well.
Hi Kilian,
First of all thank you for your comment and correction about my answer and sorry for late reply.
I am totally agree and understand that timer is retrying for 3 times (configured number of trials and can be changed) and I am also agree that next run is calculated once timer start based on its schedule and not after finishing execution or failing.
I went through your article and checked OutSystems timer documentation again and after that I tried timer to fail in each run by myself to check if its deactivated or not and it seems my fault that timer will be deactivated. But correct answer that next run will be calculated and updated.
I hope you had a great weekend!
"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"
The above is not true. As I've written in my article on timers, the next run date is calculated when the timer is started, not after it finishes. The restart mechanism of timers does not depend on the next run date/time.
If an unhandled exception occurs, the scheduler will check whether this was the last retry, and if so stops trying to restart the timer. If it's not the last retry, it will immediately start the timer again. After the final retry, it won't start the timer again, until it reaches the next run date, after which the timer is started - but this is regardless of whether the timer succeeded or failed.