(#14766) Calculate runinterval from the start of a job

In the fix for #14766 we inadvertently changed the calcuation of runinterval
to happen from the end of a job instead of the start. This fixes that by
making the time dependencies in Scheduler explicit and adds a test that would
have caught this regression.