system.util.getGlobals() not persisted across Designer Save

Ignition doesn’t have a built in scheduler for script execution. I thought Ignition’s BasicExecutionEngine was a solution.

Creating a new BasicExecutionEngine object on each startup loses reference to the old one and the old reference was needed to shutdown the existing scheduled threads. Without the that reference there is no way to stop the old threads and so new threads are duplicated on each gateway restart causing duplicated execution and memory leaks.

My purpose in using getGlobals() was to save a reference to A BasicExecutionEngine as described in this post.

If getGlobals() can’t save a reference to BasicExecutionEngine is there another way to schedule script execution ?