cronExpression= "/5 *"<-- this is every 5 minutes
prints out from log:
now=2017-03-25 15:38:11.667843072 -0700 PDT next_schedule=[2017-03-25 15:40:00 -0700 PDT] sec_diff=109" <-- 109 secs?
e, err = cronexpr.Parse(aws.StringValue(cronExpression))
base := time.Now()
next := e.NextN(base, 1)
// normalize before subtraction to Unix Time
d := int(next[0].Unix() - base.Unix())
logging.Infof("now=%s next_schedule=%s sec_diff=%d", base, next, d)
cronExpression= "/5 *"<-- this is every 5 minutes prints out from log: now=2017-03-25 15:38:11.667843072 -0700 PDT next_schedule=[2017-03-25 15:40:00 -0700 PDT] sec_diff=109" <-- 109 secs?
e, err = cronexpr.Parse(aws.StringValue(cronExpression)) base := time.Now() next := e.NextN(base, 1) // normalize before subtraction to Unix Time d := int(next[0].Unix() - base.Unix()) logging.Infof("now=%s next_schedule=%s sec_diff=%d", base, next, d)