Skip to content

Commit

Permalink
Merge branch 'master' of github.com:marcsantiago/gocron
Browse files Browse the repository at this point in the history
  • Loading branch information
pbabbicola committed Nov 5, 2018
2 parents 698ee4b + 54db357 commit 812325c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gocron.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,13 @@ func (j *Job) scheduleNextRun() error {

switch j.unit {
case days:
j.shouldDo = true
j.mu.Lock()
j.nextRun = j.roundToMidnight(j.lastRun)
j.nextRun = j.nextRun.Add(j.atTime)
j.mu.Unlock()
case weeks:
j.shouldDo = true
j.mu.Lock()
j.nextRun = j.roundToMidnight(j.lastRun)
dayDiff := int(j.startDay)
Expand Down

0 comments on commit 812325c

Please sign in to comment.