2016-08-17, 17:36
Hi,
I have an addon script that can be invoked remotely via the JSONRPC interface, but I need a mechanism to prevent the script from running multiple instances.
I have though of creating a lock file / lock variable and checking for that when the script is invoked.
I don't want to write to the SD disk all the time and prefer a persistent memory variable (persistent until reboot is ok) to be used for a lock.
Can you create global memory variables that persist after a script exists that can be read / checked the next time the script runs?
How do you create such a persistent memory variable?
I have an addon script that can be invoked remotely via the JSONRPC interface, but I need a mechanism to prevent the script from running multiple instances.
I have though of creating a lock file / lock variable and checking for that when the script is invoked.
I don't want to write to the SD disk all the time and prefer a persistent memory variable (persistent until reboot is ok) to be used for a lock.
Can you create global memory variables that persist after a script exists that can be read / checked the next time the script runs?
How do you create such a persistent memory variable?