CPrince Posted June 26, 2022 Posted June 26, 2022 I am looking to create an "if" statement that runs 24/7. I have many programs that count things at various intervals 24/7. Currently I am doing a "if" time between 00:01 AM and 23:59 PM. This works fine but seems seems a bit over the top. Just trying to clean things up a bit. Example: Set Temperature Variable - [ID 0069][Parent 0001] If From 12:00:00AM To 11:59:00PM (same day) Then Repeat Every 10 minutes $sFIB.Temp = 'Guest Bedroom / ZW 002 Multilevel Sensor 1' Temperature °C $sFIB.Temp *= 1.8 $sFIB.Temp += 32 Else - No Actions - (To add one, press 'Action')
MrBill Posted June 26, 2022 Posted June 26, 2022 Set "Run at Startup" attribute for that program on the Programs > Summary tab, and leave the IF blank. You might want to vary, or not always use Repeat every 10 minutes, so that you don't have them all running at the same moment. or throw in a wait X seconds between the "then" and "repeat" to stagger them by a second, a couple at the same moment won't cause a problem but if there were a lot it could, well at least with a 994. 1
CPrince Posted June 27, 2022 Author Posted June 27, 2022 @MrBill; yes, so obvious I did not think about it! I rarely use that "Run at Startup". Thanks!
MrBill Posted June 27, 2022 Posted June 27, 2022 4 minutes ago, CPrince said: @MrBill; yes, so obvious I did not think about it! I rarely use that "Run at Startup". Thanks! I actually only use it one program, but that program runs a program a couple of minutes after startup that starts all the heartbeats and monitor programs. Long story short I was battling startup errors at some point and had to find a way to make some things start later.
Recommended Posts