trigger prepareShutdown