17.07.2023, 19:42
Tanks for the tips... i tried to execute all the tips in the new script... but it's still not working
Code:
-- Define the group object
local myobject = grp.find('0/0/21')
-- Define the time duration in seconds
local fiveMinutesInSeconds = 5 * 60
local threeMinutesInSeconds = 3 * 60
-- Check the last update time of the group object
local lastUpdateTime = myobject.updatetime
-- Check if the group object has not been updated for at least 5 minutes
if os.time() - lastUpdateTime >= fiveMinutesInSeconds then
-- Turn on the group object
grp.write(myobject, true)
-- Wait for 3 minutes
os.sleep(threeMinutesInSeconds)
-- Turn off the group object
grp.write(myobject, false)
end