With the Grails Quartz Plugin, schedule the job once an hour:
package
myapp.jobs
import grails.plugins.quartz.Job
class MyJob implements Job {
static triggers = {
cron name: 'hourlyTrigger', cronExpression: '0 0 * * * ?'
}
def execute(context) {
println "Eseguito alle ${new Date()}"
}
}
Then trigger it just once in your app:
MyJob.triggerNow()