May 19, 201610 yr I have a program that controls an outlet to be "on" for 2 hours then "off" for a minute then "on" again for 2 hours etc. If $Allow_to_Run is 1 Then Repeat Every 1 minute Set 'Outlet' On Wait 2 hours Set 'Outlet' Off Else (blank) I would like to enhance the program to only do this 4 times and then set the outlet "off" for 16 hours, then repeat the 2 hour "on/off" cycle again. Thanks in advance for your help
May 19, 201610 yr Logically, i suppose you could try: If $allowtorun is 1 Then Repeat 4 times Set outlet on wait 2 hours Set outlet off Wait 1 minute Repeat Run next program (then path) Else Halt next program Next program: If Nothing Then Wait 16 hours Run last program (if path)
May 20, 201610 yr One program could do it by calling itself If $Allow_to_Run is 1 Then Repeat for 4 times Set 'Outlet' On Wait 2 hours Set 'Outlet' Off Wait 1 minute Repeat 1 times Wait 16 hours Run (if) program.self Else Set 'Outlet' Off Edited May 20, 201610 yr by larryllix