Browse Source

new tasks should be scheduled based on the current time

Travis Terry 9 years ago
parent
commit
2e451031b1
1 changed files with 1 additions and 1 deletions
  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()