Piston executing more than once?


#1

There are still some basic things I don’t understand about how Webcore works. Here is this piston for example. It should turn on a light at 8am, then at 10am change colors on a weekday, or turn off if it’s a weekend. That is it. Yet, it seems like it executes every 2 hours. Why?

*


#2

Well, you are looping 12 times and within the loop you have a 2 hour wait. It should run every 2 hours for 12 times which is 24 hours and then you are back to start. Not sure what you intended but don’t think this is it.

Perhaps you want to move everything from line 38-64 below the for loop (but still inside the every statement)?


#3

Ah, you are right. The for should have ended after I set the variable. I overlooked that the rest of the code was inside the loop.