diff --git a/core/src/main/java/hudson/scheduler/CronTab.java b/core/src/main/java/hudson/scheduler/CronTab.java index cd5b6377c955862eca51fb073c792b026c53d2d7..c70b01f11a763d21fc25927f693fe594e9ff825d 100644 --- a/core/src/main/java/hudson/scheduler/CronTab.java +++ b/core/src/main/java/hudson/scheduler/CronTab.java @@ -101,8 +101,9 @@ public final class CronTab { */ public String checkSanity() { for( int i=0; i<5; i++ ) { + long bitMask = (i<4)?bits[i]:(long)dayOfWeek; for( int j=LOWER_BOUNDS[i]; j<=UPPER_BOUNDS[i]; j++ ) { - if(!checkBits(bits[i],j)) { + if(!checkBits(bitMask,j)) { // this rank has a sparse entry. // if we have a sparse rank, one of them better be the left-most. if(i>0)