Cleanup of schedulers in forests and databases