Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Eduardo Caetano
301
Views
4
Comments
run timer 2 in 2 minutes
Question
Forge
Hi All.
I need to run a timer 2 in 2 minutes during the whole day, but I can only run 5 in 5 minutes.
How can I do?
best regards
Eduardo
Nuno Reis
MVP
You can't, but here are some tricks.
Lazy way:
Call the action 5 times inside another action, with 4 two minutes Sleeps between calls (you can get Sleep from extension Sleep).
Adjust those two minutes so that they don't overlap.
Better way:
At the end of the Action, use the Wake action that every timer has, to call the timer again. I think it takes 20 seconds to revive, so add a Sleep of 100 more seconds (again, or less). Create a safety so it doesn't run for more that half an hour or so. That way if it fails, it will start again soon.
There are many more ways, but remember it will consume a lot of resources from the server.
Eduardo Caetano
Thank nuno. I'll try to use your help!
best regards
Eduardo
André Vieira
Staff
Hi Eduardo,
Why do you need a timer running every 2 minutes? You must be aware that timers are not guaranteed to run on intended schedule, it depends on a lot of things namely the availability of the server...
Daniel Martins
Hi Eduardo,
If you want to make sure that the 2 min are accomplished I suggest you to expose the timer action in a webservice and call that webservice from other Java/.NET component where you can schedule and trigger that Webservice call in every 2 min.
Hope it helps you.
Kind regards.
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...