Hi. I have an app made with ai2 that connects to a MySql to send and bring information.
From the beginning, it performs this synchronization with the push of a button and thus works very well.
But now I'm trying to make it work automatically, for example; Release instruction to synchronize every 20 minutes.
The app has 8 screens. In the first, which is the one that is usually open, I put the clock changing its name to Temporizador to identify it against the other clocks that I use, one per screen. I activated the options TimerAlwaysFires and TimerEnabled, leaving TimerInterval in 10000 (ten thousand milliseconds).
In the blocks I put 2 global variables: Momento and Lapso, at the beginning I set Momento to 1 and Time in 60, that for 10,000 milliseconds is 10 min. And the Temporizador is adding 1 to the momento in each interval. At the moment when the momento reaches the Lapso, the momento is set to 1 and the instruction to go to the synchronization screen is sent. The one that identifies where it comes from and synchronizes automatically and at the end closes that screen returning to the main one.
Everything works very well the first hour, more or less. Then, it seems to be delayed or anticipated at random, getting to not synchronize in one hour or, worse and much more frequently, to synchronize several times one after the other.
I have no idea what provokes it. Navigate between the screens or leave the cel on the table without touching, it ends up going crazy.
Any ideas or suggestions?
Screen1 I susspend timer when changue screen and reactivated when back

Screen9 The sync process have 2 ways; Manual, whn click sync button or automatic, when recived a start value. In this case, when sync ending, closse screen and back to screen1.
