Merge "Do not schedule restarts if the system is shutting down" into nyc-dev