[PICNIC Problem][SOLVED] Scheduled Method Not Running

I have a method I'm scheduling via an app. I can see that it's being scheduled to run, and then rescheduled once the time has passed, but nothing happens. No logs, no updates to the variables. I am seeing logs from other functions in the app, so know it's not a logging issue. Any help?

schedule("0 1 0 * * ?",dayStartEnergy)
def dayStartEnergy() {
	logDebug "Daily reset"
	energies.each {dev ->
		if(dev.currentEnergy) {energy = dev.currentEnergy} else {energy = 0}
		state.energies["$dev.id"].dayStart = energy
		state.energies["$dev.id"].weekStart = state.energies["$dev.id"].thisWeekEnergy
		state.energies["$dev.id"].monthStart = state.energies["$dev.id"].thisMonthEnergy
		logDebug "${dev} starting energy is ${state.energies["$dev.id"].dayStart}"

In case anyone else runs across this. I hadn't installed the app and was still sitting at the initial setup screen (realized this part today). My presumption is that since the app wasn't installed, the method wasn't being called properly even though it was being scheduled successfully.

Set this all back up today, made sure to actually click "done" to install the app, and it worked just fine.

1 Like