No signature of method for "schedule"

Clearly this is a bug. I pasted the sample code for "schedule" from the documentation directly into my app and it also failed.

I pasted the sample code for "runInMillis" and it did not fail.

Any clues?

Can you provide the actual code you used in the app?

Here's the code - it worked in SmartThings so I did assume it work would here.

Found the fix "clash of method names". Renamed my method "schedule" to private "scheduleSprinkers" and it stopped complaining. I should have figured it out. Many thanks for your interest.

/**

preferences {
section("Water valves ") {
input "bed1", "number", title: "Duration garden bed 1", required: true
input "bed2", "number", title: "Duration garden bed 2", required: true
input "bed3", "number", title: "Duration garden bed 3", required: true
input "bed4", "number", title: "Duration garden bed 4", required: true
}
section("Schedule") {
input "StartTime", "time", title: "Start watering program", required: true
}
section("Water valve") {input "valve", "capability.momentary", required: true, multiple:false}
section("Weather Source") { input "weatherSource", "capability.temperatureMeasurement", required: true}
}

def installed(){
log.debug "installed"
}

def updated(){
log.debug "Update"
unsubscribe()
unschedule()
valve.each {vlv ->
vlv.shutOff()
}
initialize()
}

private scheduleSprinkers(){
valve.each {vlv ->
vlv.enable true,30
}
nextValve()
}

void mymethod(data) { // copied from documentation
log.debug "mymethod parameter: $data"
}
// This section determines which time of day it is to run.
def initialize() {
log.debug "Start the WATER plan"
//coppied from documentation
schedule('0 */10 * ? * *', mymethod, [data: ["myKey":"myValue"]]) // this fails as well
// schedule(timeToday(StartTime, location.timeZone), "schedule") this works in SmartThings
}

def nextValve(){
int delay = 0
valve.each {vlve ->
log.debug "Call next ${vlve.currentState("status").value }"
String stat = vlve.currentState('status').value
stat = stat[stat.length() -1 ]
int next = 0
if (stat.isInteger()) next= stat.toInteger()
while (delay == 0){
if(++next >= 5 ) {
vlv.enable false,30
return // sequence ended next = 0
}
delay = (next == 1 ? bed1 : next ==2 ? bed2 : next ==3 ? bed3 : next==4 ? bed4 : "0" ).toInteger()
if(delay != 0){
delay = delay * 60;
log.debug "Switch ${vlve.currentState("status").value }-Activate ${next} Bed duration ${delay}"
vlve.activate("${next}","${delay}")
if(next >0) runIn(delay, nextValve)
}
}
}
}

Download the Hubitat app