I have used a groovy service on a timer in a grails app before by setting a timertask in the resources.groovy.
I need to do something similar now, but can't get my head around how to do it.
Basically I need a timer task again which will go off in the background and get some data and populate my database. but I also need a countdown timer displayed on the gsp which will effectively count down till the next time the service is called. That bit is relatively straight forward and can be handled in javascript within the gsp I think.
but this is where I get confused - once the service has run and populated the database I need to refresh some of the data on the screen. I guess this could be done using some form of ajax? but I'm not sure how?!
Can anyone point me in the right direction. I hope I've explained it well enough!