Added support for different modes for scheduler