<dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> <version>2.3.0</version> </dependency>
public static void main(String[] args) throws ParseException { // 每年最后一天 CronExpression exp =new CronExpression("0 0 0 L 12 ? *"); Date next =new Date(); for(int i =0;i < 10; i ++){ next = exp.getNextValidTimeAfter(next); System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(next)); } }