package form import ( "time" "github.com/robfig/cron/v3" ) type Cron string func (c Cron) Next() time.Time { schedule, err := cron.ParseStandard(string(c)) if err != nil { return time.Time{} } return schedule.Next(time.Now()) }