fxing an issue when using the "when" argument to the scheduler.  This was a bug that was introduced when the cron like support was added.
Merge pull request #15396 from garethgreenaway/15369_schedule_broke_with_when

Fixes to schedule