Java 计划程序作业未在指定的时间间隔内执行

Java 计划程序作业未在指定的时间间隔内执行,java,cron,jira,quartz-scheduler,scheduler,Java,Cron,Jira,Quartz Scheduler,Scheduler,我已经创建了执行指定作业类的jira插件调度程序作业 在这里,我无法按我定义的指定时间间隔执行调度程序作业 以下是安排时间间隔的内容: 此处,将开始日期安排为-当前日期(00:00:00)当天开始和 间隔为(长)(15*3600000))(其中15以小时为单位) stuff应该在下午3点执行,但它不会在该时间执行,而是在其他时间随机执行 Calendar startDate = Calendar.getInstance(); startDate.set(startD

我已经创建了执行指定作业类的
jira插件调度程序作业

在这里,我无法按我定义的指定时间间隔执行调度程序作业

以下是安排时间间隔的内容:

此处,将开始日期安排为-
当前日期(00:00:00)
当天开始和

间隔为
(长)(15*3600000))
(其中15以小时为单位)

stuff应该在下午3点执行,但它不会在该时间执行,而是在其他时间随机执行

Calendar startDate = Calendar.getInstance();               
startDate.set(startDate.get(Calendar.YEAR), startDate.get(Calendar.MONTH), startDate.get(Calendar.DATE),0,0,0);

pluginScheduler.scheduleJob(schedulerUniqueKey,                       
      // unique name of the job
      DailyReportService.class,     // class of the job
      new HashMap<String,Object>() {{
            put("1", DailyReportImpl.this);
       }},                          // data that needs to be passed to the job
      startDate.getTime(),          // the time the job is to start
      intervalInMilisections);
Calendar startDate=Calendar.getInstance();
startDate.set(startDate.get(Calendar.YEAR)、startDate.get(Calendar.MONTH)、startDate.get(Calendar.DATE)、0,0,0);
pluginScheduler.scheduleJob(schedulerUniqueKey,
//作业的唯一名称
DailyReportService.class,//作业的类
新HashMap(){{
放置(“1”,DailyReportImpl.this);
}},//需要传递给作业的数据
startDate.getTime(),//作业开始的时间
间隔切片);

您能告诉我什么地方出了问题以及如何安排吗。

您将开始日期设置为今天上午0点。时间表触发了吗?您可以在过去设置开始日期,而不是在将要实现的某个日期。还是我错了?在这种情况下,您可以设置一个未来的日期,比如明天凌晨0点。不,调度程序不会触发。我将开始日期设置为当天的开始时间示例:当前日期时间设置为:2013年4月1日01:30:55 PM然后,我在schedule job中将开始日期设置为“2013年4月1日00:00:00”,延迟设置为“54000000”毫秒(15小时),因此,我希望它在下午3点执行,但不按预期工作。我确实将日期设置为当天的开始时间(00:00:00),因为,我需要在时间的基础上执行调度程序,所以,设置与时间相关的延迟。您是否尝试将明天作为开始日期而不延迟,并查看是否运行?可能延迟不起作用,因为从未通过开始日期。好的,所以我尝试将“0”作为dealy,然后它给我一个错误“repeatInterval必须大于零”,因此,我尝试给出1000毫秒,如下所示:
pluginScheduler.scheduleJob(schedulerUniqueKey,//作业DailyReportService.class的唯一名称,new HashMap(){{put(“1”,DailyReportImpl.this);}},startDate.getTime(),1000);//此处开始日期为次日00:00:00