diff --git a/quartz-core/src/main/java/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java b/quartz-core/src/main/java/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java index 6917dcf87..12ff32cf1 100644 --- a/quartz-core/src/main/java/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java +++ b/quartz-core/src/main/java/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java @@ -2612,7 +2612,7 @@ public List selectTriggerToAcquire(Connection conn, long noLaterThan ps.setBigDecimal(3, new BigDecimal(String.valueOf(noEarlierThan))); rs = ps.executeQuery(); - while (rs.next() && nextTriggers.size() <= maxCount) { + while (rs.next() && nextTriggers.size() < maxCount) { nextTriggers.add(triggerKey( rs.getString(COL_TRIGGER_NAME), rs.getString(COL_TRIGGER_GROUP)));