Hi,
I have a service which is set to execute every 30 seconds to perform a simple task, that is configured like this:
The question is... if, for some reason, the execution takes more than 30 seconds, will a second instance of the server be fired before the previous one finishes? In case of yes, which would be the best-practice approach to avoid that (ie: to fire the new start 30 seconds after the previous one finishes)?
Thank you very much!
I have a service which is set to execute every 30 seconds to perform a simple task, that is configured like this:
B4X:
Sub Service_Start (StartingIntent As Intent)
Try
StartServiceAt(Me, DateTime.Now + 30 * DateTime.TicksPerSecond, False)
If StartingIntent.HasExtra("android.intent.extra.ALARM_COUNT") Then
.
.
.
The question is... if, for some reason, the execution takes more than 30 seconds, will a second instance of the server be fired before the previous one finishes? In case of yes, which would be the best-practice approach to avoid that (ie: to fire the new start 30 seconds after the previous one finishes)?
Thank you very much!