You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a pure programmatic Quartz approach, with a code like:
@ApplicationScoped
public class PeriodicTask {
@Inject
Scheduler quartz;
public void start() throws SchedulerException {
final JobDetail job = newJob(MyJob.class)
.withIdentity("questions", "millionaire")
.build();
final SimpleTrigger trigger = newTrigger()
.withIdentity("questionsTrigger", "millionaire")
.startNow()
.withSchedule(
SimpleScheduleBuilder.simpleSchedule()
.withIntervalInSeconds(20)
.withRepeatCount(5))
.build();
quartz.getListenerManager()
.addTriggerListener(new EndTriggerListener("EndTrigger"),
keyEquals(triggerKey("questionsTrigger", "millionaire")));
quartz.scheduleJob(job, trigger);
}
}
You get the next exception:
Caused by: java.lang.IllegalStateException: Cannot produce org.quartz.Scheduler - Quartz scheduler is disabled or no schedules were found
at io.quarkus.quartz.runtime.QuartzScheduler.produceQuartzScheduler(QuartzScheduler.java:69)
When you add the next property:
quarkus.quartz.force-start=true
Then everything works as expected, so I think that it would be nice to have a better error message saying, I couldn't generate the Scheduler, maybe you have not set the property to true? So people can figure out quickly what is the problem.
The text was updated successfully, but these errors were encountered:
Description
With a pure programmatic Quartz approach, with a code like:
You get the next exception:
When you add the next property:
Then everything works as expected, so I think that it would be nice to have a better error message saying, I couldn't generate the Scheduler, maybe you have not set the property to true? So people can figure out quickly what is the problem.
The text was updated successfully, but these errors were encountered: