os.pullEvent = os.pullEventRaw rednet.open("top") print("G&K Industries Day/Night Handler") while true do sleep(0) local MChours = math.floor(os.time()) local MCminutes = math.floor((os.time()-math.floor(os.time()))*60) if MChours >= 6 and MChours < 18 and MCminutes >= 10 then rednet.send(379,"Door-Open") elseif MChours >= 18 and MCminutes >= 10 then rednet.send(379,"Door-Close") elseif MChours >= 0 and MChours < 6 then rednet.send(379,"Door-Close") end end