We have developed a class that implements JobRunner interface. For running our Job we call this method:
private static final String EVERY_5_MINUTES = "*/5 * * * * ?"; JobConfig jobConfig = JobConfig.forJobRunnerKey(JOB_RUNNER_KEY).withRunMode(RunMode.RUN_LOCALLY).withSchedule(Schedule.forCronExpression(EVERY_5_MINUTES, TimeZone.getTimeZone("GMT"))); schedulerService.scheduleJob(JOB_ID, jobConfig);
Since installation of our plugin, wee see in the logs, that Job is executed every 1 minute. Is it possible that CRON expresion is not correct? (*/5 * * * * ?) We have tested with longer intervals but we have our job executed every minute.
We think it is a bug with the scheduler when using CRON expressions. If we use Schedule.forInterval(), it works propery.