added comment with quartz cron formatting
@@ -39,9 +39,21 @@ public class CronExpressionTest {
private static final Logger log = LoggerFactory.getLogger(CronExpressionTest.class);
+ /*
+ Cron expressions are comprised of 6 required fields and one optional field separated by white space.
+ The fields respectively are described as follows:
+
+ Field Name Allowed Values Allowed Special Characters
+ Seconds 0-59 , - * /
+ Minutes 0-59 , - * /
+ Hours 0-23 , - * /
+ Day-of-month 1-31 , - * ? / L W
+ Month 1-12 or JAN-DEC , - * /
+ Day-of-Week 1-7 or SUN-SAT , - * ? / L #
+ Year (Optional) empty, 1970-2199 , - * /
+ */
@Test
public void testNextFireTimes() {
-
String cronExpression = "0 0 12 1/1 * ? *"; // every day at 12:00 PM
try {
List<Date> dates = CronExpressionUtil.getNextFireTimes(cronExpression, 20);
