Fixes #2013 - scheduler: Prioritize scheduled command according to their step