Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable Quartz update attempt?

I am using:

    <dependency>         <groupId>org.quartz-scheduler</groupId>         <artifactId>quartz</artifactId>         <version>1.8.0</version>     </dependency> 

When application comes up, I consistently get:

2013-01-03 15:25:34 UpdateChecker [DEBUG] Checking for available updated                          version of Quartz... 2013-01-03 15:25:43 UpdateChecker [DEBUG] Quartz version update check failed:                         java.io.IOException: Server returned HTTP response                          code: 503 for URL: long url here 

How can I eliminate these? (Both the message and attempt to update)

like image 617
James Raitsev Avatar asked Jan 03 '13 21:01

James Raitsev


People also ask

How do you turn off a quartz scheduler?

We disable the quartz scheduler locally by commenting out the scheduler factory bean in the jobs. xml file.

How do I stop a quartz scheduler in Java?

deleteJob(jobKey(<JobKey>, <JobGroup>)); This method will only interrupt/stop the job uniquely identified by the Job Key and Group within the scheduler which may have many other jobs running. scheduler. shutdown();

What is misfire in quartz?

A misfire occurs if a persistent trigger “misses” its firing time because of the scheduler being shutdown, or because there are no available threads in Quartz's thread pool for executing the job. The different trigger types have different misfire instructions available to them.

How do I reschedule my quartz job?

You have to reschedule the job by creating a new trigger. This will replace the same job with a new trigger fire time.


1 Answers

In quartz.properties, you can add

org.quartz.scheduler.skipUpdateCheck=true 

In code, this would look like:

Properties props = new Properties(); props.setProperty("org.quartz.scheduler.skipUpdateCheck","true");  // set other properties ...such as props.setProperty("org.quartz.jobStore.class", "org.quartz.simpl.RAMJobStore"); props.setProperty("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); props.setProperty("org.quartz.threadPool.threadCount", "4");  SchedulerFactory schdFact = new StdSchedulerFactory(props); 

Edit:

From @Stephan202's comment below you can use the constant PROP_SCHED_SKIP_UPDATE_CHECK

The code in that case would be

props.setProperty(StdSchedulerFactory.PROP_SCHED_SKIP_UPDATE_CHECK,"true"); 
like image 142
Reimeus Avatar answered Sep 23 '22 15:09

Reimeus