config: support days (d) and weeks (w) in durations

fixes #18
This commit is contained in:
Christian Schwarz
2017-10-05 15:12:50 +02:00
parent 3e647c14c0
commit 83d450b1f2
6 changed files with 52 additions and 40 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ func parseLocalJob(c JobParsingContext, name string, i map[string]interface{}) (
return
}
if j.Interval, err = time.ParseDuration(asMap.Interval); err != nil {
if j.Interval, err = parsePostitiveDuration(asMap.Interval); err != nil {
err = errors.Wrap(err, "cannot parse interval")
return
}