Explorar o código

new tasks should be scheduled based on the current time

Travis Terry %!s(int64=10) %!d(string=hai) anos
pai
achega
2e451031b1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      cron.go

+ 1 - 1
cron.go

@@ -164,7 +164,7 @@ func (c *Cron) run() {
 
 		case newEntry := <-c.add:
 			c.entries = append(c.entries, newEntry)
-			newEntry.Next = newEntry.Schedule.Next(now)
+			newEntry.Next = newEntry.Schedule.Next(time.Now().Local())
 
 		case <-c.snapshot:
 			c.snapshot <- c.entrySnapshot()