Changes for on demand tasks.

Added service for on-demand tasks.

Restructued scheduled executor to separate new and old tasks, with the aim to allow this to be used to recover tasks overridden by on-demand requests.