Fixes to scheduler in 2014.7

Fixing a bug in the scheduler that caused a runaway job and CPU spikes when using the 'when' parameter.  Also some cleanup of redundant calls to time.time and the comparison used to see when a job should run. #18534