Call Schedule Tasks.

dealsmonkey

Active Member
Licensed User
Longtime User
Hi all,

If I am reading correct when I call startserviceat("",xx,true), this cancels any other scheduled requests for this service ?

Is there anyway to schedule multiple start times for a service ?

for example :

startserviceat("MyService",10:23:00",True)
startserviceat("MyService",15:45:00",True)
startserviceat("MyService",18:10:00",True)


Neil
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
this cancels any other scheduled requests for this service ?
Yes. This is how Android works.

The way to do it is by making the service schedule the next time itself. You can for example save the the times in a file and then each time read the next time from the file and schedule it. Note that you should pass a ticks value. Not the time string.
 
Upvote 0

dealsmonkey

Active Member
Licensed User
Longtime User

Ah never thought of doing that ! :BangHead:

I am already storing the schedule times in a database, so just need to read them in order in the service.

I am using DateTime.TimeParse() to be able to pass the string. This is working but I need to "queue" other schedules

Neil
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…