Backport autoscale schedule

This backports the test refactoring and adds the schedule features.