Is there a way to call a service at specific intervals?
If not, I guess a Javascript timer would be ok to use, but then how to call the service to run?
Thanks..
Max,
Yes, I managed to create a timer from script that works until cancelled. I noticed that when the service runs, the entire screen develops a grey overlay with a busy icon until finished, like it's working without freeing the current thread.
Is there a way to avoid this?
Yes, the application I 'm working on needs to run 24/7 in the background, updating at set intervals. The screen would interfere with the other phone/user functions. So, I guess my next question is, how to keep running our applications after exit, in this situation the screen should not turn grey or show Ajax update icon when accessing services.
I was looking for the same thing and tried this solution, but later found:
var mytimedfunc=setInterval("javascript function",milliseconds);
which automatically runs the event everyXseconds as opposed to once after timeout. I like this a bit better because it's really easy to just add:
clearInterval(mytimedfunc);
on "beforeUnload". Don't know if this is useful to anyone but just thought I would add to the discussion.
Jonathan, thank you for sharing this.