This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Cancel the saved command line after the os.sleep() command
#3
Hello Daniel !
I tried killing PID, but it gives error, do you know what is the error?
"User script:6: bad argument #1 to 'kill' (number expected, got nil)
stack traceback:
[C]: in function 'kill'
User script:6: in main chunk"
------------------event 6/1/18----
-- object mapped to this event must have its data type set
value = event.getvalue()
pid = os.getpid()
oldpid = storage.get('MyPID')
if oldpid ~= pid then
os.kill(oldpid, signal.SIGKILL)
os.sleep(60)
grp.write('6/1/18',false)
storage.set('MyPID', pid)
end
---------------------------------
Am I writing like this? I want that every 60 seconds without effect, it will be ==false. And if there is an impact, for example, the 55th second, if it has an effect, it will reset the time to be counted as 60 seconds later ==false
Thank so much!
Reply


Messages In This Thread
RE: Cancel the saved command line after the os.sleep() command - by phongvucba - 13.08.2022, 06:22

Forum Jump: