Friends, I am using quartz scheduler for running a task every 5 minutes starting when application deployed & running continuously so i have written code as:
SchedulerFactory sf = new StdSchedulerFactory();
Scheduler sche = sf.getScheduler();
JobDetail job = newJob(RomeJob.class).withIdentity("Id1", "Rome").build();
CronTrigger trigger = newTrigger().withIdentity("Id1Trigger", "Rome").withSchedule(cronSchedule("0 0/5 * * * ?"))
.build();
sche.scheduleJob(job, trigger);
sche.start();
But its working sometime sometimes not. Please tell me whether i am missing something here?
You have many ways one of them is use trigger builder something like