What’s the correct way to pass parameters to scheduled handleMethods?
As an illustration, I’m trying to do something like this:
def onHandler(evt) {
def scheduledAt = now()
runIn( 10, someHandler(scheduledAt) )
}
def someHandler(scheduledAt) {
log.debug "I was scheduled at $scheduledAt"
}
When called like this, someHandler is called immediately. In this example an error is generated because runIn is expecting someHandler to return the name of a function to run.
I get similar behavior when trying to pass a closure to runIn, except then I get a “No signature of method” error.
Thanks for your help,
Gary