forked from vieter-v/vieter
feat(cron): improve sleep calculation; prevent invalid rescheduling of
finished builds
This commit is contained in:
parent
a1c308f29d
commit
caee56efd4
4 changed files with 55 additions and 26 deletions
|
|
@ -114,6 +114,8 @@ pub fn (ce &CronExpression) next(ref time.Time) ?time.Time {
|
|||
})
|
||||
}
|
||||
|
||||
// next_from_now returns the result of ce.next(ref) where ref is the result of
|
||||
// time.now().
|
||||
pub fn (ce &CronExpression) next_from_now() ?time.Time {
|
||||
return ce.next(time.now())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue