Since we can have no possible way of knowing what your script does, we cannot analyze it. I don't even know if the Netscape server runs the script persistently or not, so it's unlikely that you'll find a solution here. An ugly hack would be to throw in a alarm(x); at the top of your script where x is the maximum amount of time this entire script can take. That's bad- you probably don't want that. Instead, pull apart your code, especially looking at any loops for any bugs.
Related to the client pushing the STOP button? I dunno. Why don't you try it and find out?