As part of my work described in this topic http://www.cocoontech.com/forums/index.php?showtopic=15317 I've noticed that if I restart the SYS service (prkernel) while I have a timer pending, the timer still exists when prkernel restarts. This alone is not a surprise I suppose, but it does lead to a problem if the "this" object referenced in the timer script is no longer a valid object, and that is indeed the case when the object is a WebSession object. So when the timer finally fires, it causes a runtime script error.
I can imagine a similar design problem with other timers and the objects that the timer script references. Is there a particular design or coding technique to avoid this problem? For example, is there a way to indicate that a timer should not be persisted?
I can imagine a similar design problem with other timers and the objects that the timer script references. Is there a particular design or coding technique to avoid this problem? For example, is there a way to indicate that a timer should not be persisted?