I need to schedule a method to execute repeatedly, at a certain time of day selected by the user as an input of an app. I see a few apps do this:
input name: "timeInput", type: "time"...
schedule(timeInput, handlerMethod)
But that's confusing because it doesn't seem to match up with the developer documentation, which says the schedule method accepts a cron string. I'm pretty sure the time input is not a cron string. So, assuming that the above code works, why is that? Is the time input actually a cron string or does schedule accept something other than a cron string despite the developer documentation?
Update: I'm getting this error when attempting to execute the above:
groovy.lang.MissingMethodException: No signature of method: java.lang.String.call() is applicable for argument types: (java.lang.String, java.lang.String) values: [2020-06-19T12:50:00.000-0400, handlerMethod] Possible solutions: wait(), any(), trim(), dump(), size(), find() on line 235 (updated)
I suspect it's because the string argument is not a cron value as indicated in the documentation. But it's confusing that other apps use this...