Skip to content

Commit

Permalink
KYLO-2896: added comment with quartz cron formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
harschware committed Oct 29, 2018
1 parent 6d84567 commit c366090
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c366090

Please sign in to comment.