Protect again 'This EntityManager is closed' errors by using a different entity manager to write the cron result at the end of the run.