Not sure I understand the question. Loop() should call draw() each frame, forever. Does it just hang, or run out of memory?
Originally conceived for Palm Pilot during the mid-1990s heyday of the device, you begin to see the dilemma. Not sure about original jvm-based processing, but P5JS simply uses requestAnimationFrame for its infinite loop. And could probably run for years on a private web server with backup power (or low power ARM board attached to solar array / fuel cell). But decades? Will the web still exist?