09.08.2022, 16:52
(09.08.2022, 10:09)It worked. Thanks a lotadmin Wrote: Single resident script that I've posted can handle multiple timers.
Erwin's script saves process ID into storage. You can stop the script like this, change scriptname as needed:
But this approach is not 100% correct though because in some rare cases several event script instances can run in parallel.Code:scriptname = 'my_event_script'
key = 'PID:' .. scriptname
pid = storage.get(key)
if pid then
os.kill(pid, signal.SIGKILL)
storage.delete(key)
end