Implement scheduled downtimes.

Fixes #3584