Migrate background process to an event page: Use globals only in a caching manner.