NextRunAt - reports latest time not earliest
shunte88 opened this issue · comments
Stuart Hunter commented
the logic for determining next run time for a set of jobs is reversed and thus reports the latest run at time for the set
if nextRun.IsZero() {
nextRun = jobs.NextRunAt
//} else if (nextRun.UnixNano() - jobs.NextRunAt.UnixNano()) < 0 {
} else if (nextRun.UnixNano() - jobs.NextRunAt.UnixNano()) > 0 {
nextRun = jobs.NextRunAt // we want earliest not latest
}
simple fix to reverse the test ( > 0)
Sam Cook commented
Is it just the one line that needs to be changed?
Stuart Hunter commented
yep just that one line
Sam Cook commented
Sweet. I will trying forking it and fixing it