scenes not working unless manually invoke first

I have a scene on vera lite where i use a schedule (every 10min). All inhave is a luup code to evaluate time. If it is between a time, it will turn on lights. Every once and a while it seems not to work. I noticed if i manually run the scene then it works again.

Is there a reason for this?