调度程序作业不会在指定的时间间隔内执行

时间:2013-04-22 12:35:22

标签: java cron jira quartz-scheduler scheduler

我创建了jira plugin scheduler job来执行指定的作业类。

这里,我无法像我定义的那样在指定的时间间隔内执行调度程序作业。

以下是安排间隔的内容:

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

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

东西应该在下午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);

你能否说出错误以及如何安排。

0 个答案:

没有答案
相关问题