jasonlvhit / gocron

A Golang Job Scheduling Package.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

func (s *Scheduler) getRunnableJobs() bug?

fxk2006 opened this issue · comments

func (s *Scheduler) getRunnableJobs() (running_jobs [MAXJOBNUM]*Job, n int) {
runnableJobs := [MAXJOBNUM]*Job{}
n = 0
sort.Sort(s)
for i := 0; i < s.size; i++ {
if s.jobs[i].shouldRun() {
runnableJobs[n] = s.jobs[i]
n++
}
}
return runnableJobs, n
}

Hi @fxk2006! I'm sorry, but I didn't understand the bug here. What is happening and what was expected?

Closing due to inactivity