标签:default 注意 int sim 线程休眠 exe 微信小程序 enable ted
org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount: 1 org.quartz.threadPool.threadPriority: 5 设置临界时间为6秒 org.quartz.jobStore.misfireThreshold: 6000
job.xxx.class=com.uelink.dkapi.job.RemindJob job.xxx.group=default job.xxx.id=1 job.xxx.cron=*/5 * * * * ? job.xxx.enable=true
public class RemindJob implements Job{ @Override public void execute(JobExecutionContext context) throws JobExecutionException { System.out.println("微信小程序定时提醒通知开始"); DateFormat df = new SimpleDateFormat("hh:mm:ss"); System.err.println("[" + Thread.currentThread().getName() + "] Now: " + df.format(context.getFireTime()) + " Scheduled: " + df.format(context.getScheduledFireTime()) + " Previous: " + df.format(context.getPreviousFireTime()) + " Next: " + df.format(context.getNextFireTime())); try { Thread.sleep(10 * 1000); } catch (InterruptedException e) { e.printStackTrace(); } System.err.println("线程休眠结束时间:"+df.format(new Date(System.currentTimeMillis()))); } }
Now: 06:22:20 Scheduled: 06:22:20 Previous: 06:22:15 Next: 06:22:25 Now: 06:22:30 Scheduled: 06:22:25 Previous: 06:22:20 Next: 06:22:30 Now: 06:22:40 Scheduled: 06:22:40 Previous: 06:22:25 Next: 06:22:45 Now: 06:22:50 Scheduled: 06:22:45 Previous: 06:22:40 Next: 06:22:50 Now: 06:23:00 Scheduled: 06:23:00 Previous: 06:22:45 Next: 06:23:05
Now: 06:05:25 Scheduled: 06:05:25 Previous: 06:05:20 Next: 06:05:30 Now: 06:05:35 Scheduled: 06:05:30 Previous: 06:05:25 Next: 06:05:35 Now: 06:05:45 Scheduled: 06:05:35 Previous: 06:05:30 Next: 06:05:40 Now: 06:05:55 Scheduled: 06:05:40 Previous: 06:05:35 Next: 06:05:45 Now: 06:06:05 Scheduled: 06:05:45 Previous: 06:05:40 Next: 06:05:50
quartz配置参数org.quartz.jobStore.misfireThreshold含义解释
标签:default 注意 int sim 线程休眠 exe 微信小程序 enable ted
原文地址:https://www.cnblogs.com/gne-hwz/p/10371534.html