06.08.2026, 06:49
Hi,
I’ve been testing the PID thermostat example from the LogicMachine scripting guide: https://kb.logicmachine.net/scripting/pid-thermostat/
I have a clarification question about how the scripts run in memory:
Cheers xxyzz
I’ve been testing the PID thermostat example from the LogicMachine scripting guide: https://kb.logicmachine.net/scripting/pid-thermostat/
I have a clarification question about how the scripts run in memory:
- For resident scripts, my understanding is that they run inside a long-lived loop (with a sleep based on the standby time). Because the script stays resident, allocations (e.g., tables/metatables) remain valid across loop iterations, so the script doesn’t “reset” memory each cycle. Is that correct?
- For scheduled scripts, my understanding is that they are invoked each time the schedule triggers (similar to a cron job that starts a fresh execution of the script). In that case, allocations would be fresh per run. Is that correct?
Cheers xxyzz