feat(cron): improve sleep calculation; prevent invalid rescheduling of

finished builds
This commit is contained in:
Jef Roosens 2022-04-30 16:08:35 +02:00
parent a1c308f29d
commit caee56efd4
Signed by untrusted user: Jef Roosens
GPG key ID: B75D4F293C7052DB
4 changed files with 55 additions and 26 deletions

View file

@ -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())
}