bug
This commit is contained in:
parent
e4176dfd94
commit
21042e4677
|
@ -154,7 +154,7 @@ function ctmatch_one(ctval, ref, parts, part, i, j, start, end, ste
|
|||
#print "final: is " ref " ~ " ctval " ? " (ok? "yes": "no") #DEBUG
|
||||
return ok
|
||||
}
|
||||
function ctmatch_all(M, H, dom, mon, dow, refM, refH, refdom, refmon, refdow, Mok, Hok, domok, monok, dowok) {
|
||||
function ctmatch_all(M, H, dom, mon, dow, refM, refH, refdom, refmon, refdow, Mok, Hok, alldom, domok, monok, alldow, dowok, doxok) {
|
||||
if (refM == "**ANY**") return 1
|
||||
|
||||
gsub(/\*/, "0-59", M)
|
||||
|
@ -163,16 +163,28 @@ function ctmatch_all(M, H, dom, mon, dow, refM, refH, refdom, refmon, refdow,
|
|||
gsub(/\*/, "0-23", H)
|
||||
Hok = ctmatch_one(H, refH)
|
||||
|
||||
alldom = dom == "*"
|
||||
gsub(/\*/, "1-31", dom)
|
||||
domok = ctmatch_one(dom, refdom)
|
||||
|
||||
gsub(/\*/, "1-12", mon)
|
||||
monok = ctmatch_one(mon, refmon)
|
||||
|
||||
alldow = dow == "*"
|
||||
gsub(/\*/, "1-7", dow)
|
||||
dowok = ctmatch_one(dow, refdow)
|
||||
|
||||
return Mok && Hok && monok && (domok || dowok)
|
||||
if (alldom && alldow) {
|
||||
doxok = 1
|
||||
} else if (alldom) {
|
||||
doxok = dowok
|
||||
} else if (alldow) {
|
||||
doxok = domok
|
||||
} else {
|
||||
doxok = domok || dowok
|
||||
}
|
||||
|
||||
return Mok && Hok && monok && doxok
|
||||
}
|
||||
function print_cmd(cmd) {
|
||||
print "__ctexec " quote_value(cmd)
|
||||
|
|
Loading…
Reference in New Issue