You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thans for your great cron job.
I read dayMatches code in spec.go but did not figure out why you check starBit before return result.
Why use || operation when both starBit of dom and dow is 0. I think we always need use && to get result.
Could youhelp to explain some details of this?
Thanks in advance :)
// dayMatches returns true if the schedule's day-of-week and day-of-month// restrictions are satisfied by the given time.funcdayMatches(s*SpecSchedule, t time.Time) bool {
var (
domMatchbool=1<<uint(t.Day())&s.Dom>0dowMatchbool=1<<uint(t.Weekday())&s.Dow>0
)
ifs.Dom&starBit>0||s.Dow&starBit>0 {
returndomMatch&&dowMatch
}
returndomMatch||dowMatch
}
Activity
[-]what isthe starbit used for?[/-][+]what is the starbit used for?[/+]xuyang2 commentedon Sep 21, 2023
It seems starBit means
<asterisk>#70 (comment)
feat(cron): use the entry name as the hash key for H (robfig#471)
Merge upstream/main into feat/describe-time-fields
Merge feat/describe-time-fields into feat/describe-date-fields