Add shutdown by timeout in scheduler