I have a transcript below the code in which I run two jobs. First with an interval of 10 seconds, and with an interval of 3 seconds. But ultimately at some point they will be executed simultaneously. Is there any mechanism to avoid this situation.
JobDetail jDetail = new JobDetail("Job1", "group1", MyJob.class); CronTrigger crTrigger = new CronTrigger("cronTrigger", "group1", "0/10 * * * * ?"); sche.scheduleJob(jDetail, crTrigger); jDetail = new JobDetail("Job2","group2",MyJob2.class); crTrigger = new CronTrigger("cronTrigger2","group2","0/3 * * * * ?"); sche.scheduleJob(jDetail, crTrigger);
source share