CronTriggerImpl cronTriggerImpl = new CronTriggerImpl();
// 这里写要准备猜测的cron表达式
cronTriggerImpl.setCronExpression("0 0 15 5 * ?");
// 20代表最近20次
List<Date> dates = TriggerUtils.computeFireTimes(cronTriggerImpl, null, 20);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
for (int i = 0; i < dates.size(); i++) {
System.out.println(dateFormat.format(dates.get(i)));
}
参考: