fix: setting last run when true

improve(dev): set mount volume to speed up dev container start
This commit is contained in:
2023-12-08 15:13:40 +11:00
parent 2971f5c709
commit d9d1fe72d4
8 changed files with 46 additions and 11 deletions

View File

@@ -28,14 +28,6 @@ type CronTimeSpec interface {
Match(uint8) bool
}
// type Cron interface {
// Minute() CronTimeSpec
// Hour() CronTimeSpec
// DayOfMonth() CronTimeSpec
// Month() CronTimeSpec
// DayOfWeek() CronTimeSpec
// }
type Cron struct {
minute CronTimeSpec
hour CronTimeSpec
@@ -149,6 +141,7 @@ func (c *Cron) TimeToRun(now time.Time) bool {
c.dom.Match(uint8(now.Day())) &&
c.month.Match(uint8(now.Month())) &&
c.dow.Match(uint8(now.Weekday())) {
c.lastRun = now
return true
}