Following code gives error like : The method withSchedule(ScheduleBuilder) in the type TriggerBuilder is not applicable for the arguments (MutableTrigger)
public static Trigger buildTriggerForJob(int hours, int minutes, int seconds, String name, String groupName) {
return org.quartz.TriggerBuilder
.newTrigger()
.withIdentity(name, groupName)
.withSchedule(
SimpleScheduleBuilder.simpleSchedule().withIntervalInHours(hours).withIntervalInMinutes(minutes)
.withIntervalInSeconds(seconds).repeatForever().build());
}
There is no need to do it
.build()
. Try without it.