PDA

View Full Version : Run TaskRunner at particular times of the day



gjaya26
13 Aug 2010, 9:22 AM
I have a requirement in my project to setup the page to automatically refresh at 10:45 am and 2:45 pm.
I have used the following snippet code:



this.taskRunner = Ext.util.TaskRunner({
task: this.load,
interval: 300000,
scope: this,
runWhenInvisible: false
});

This code will call refresh every 5 mins. Is there a way to achieve the refresh at particular times of the day?
Please let me know.

sosy
13 Aug 2010, 4:55 PM
Just interested, question: do you really have your browser open for the whole day???

Don't know for what you need the refresh on an specific time, i am really wondering about that.

ashaihullin
13 Aug 2010, 8:16 PM
I think you need run task every minute and check for current time. If it is your time then refresh or do something


Don't know for what you need the refresh on an specific time, i am really wondering about that.
Why not!? If it face of some webApp it can be opened hole day...

Animal
13 Aug 2010, 11:58 PM
Use a DelayedTask!