Skip to content

Commit

Permalink
Revert "Don't panic when @at schedule can't be parsed,"
Browse files Browse the repository at this point in the history
This reverts commit 26b1c07.
  • Loading branch information
yvanoers committed Jun 23, 2019
1 parent d539e06 commit b398477
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cron/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ func parseDescriptor(spec string) Schedule {
if strings.HasPrefix(spec, at) {
date, err := time.Parse(time.RFC3339, spec[len(at):])
if err != nil {
log.Printf("Failed to parse date %s: %s. Recovering as past date, job will never run on schedule.", spec, err)
date = time.Now().Add(-time.Duration(24 * time.Hour))
log.Panicf("Failed to parse date %s: %s", spec, err)
}
return At(date)
}
Expand Down

0 comments on commit b398477

Please sign in to comment.