09.08.2022, 10:09
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.
Erwin's script saves process ID into storage. You can stop the script like this, change scriptname as needed:
Code:
scriptname = 'my_event_script'
key = 'PID:' .. scriptname
pid = storage.get(key)
if pid then
os.kill(pid, signal.SIGKILL)
storage.delete(key)
end