Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable jobs in the Quartz JDBCJobStore?

What is the best way to disable a job in the JDBCJobStore without deleting it's job or trigger records and without wiping the cron expression?

like image 847
Ricardo Gladwell Avatar asked Dec 13 '10 15:12

Ricardo Gladwell


People also ask

How do you stop a job in quartz scheduler?

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();

How do I turn off quartz in database?

Use scheduler. pauseJob() or scheduler. pauseTrigger().

How do you trigger a quartz job?

You can fire the job which has a given JobKey immediately by calling triggerJob(JobKey jobKey) of your Scheduler instance. // Create a new Job JobKey jobKey = JobKey. jobKey("myNewJob", "myJobGroup"); JobDetail job = JobBuilder. newJob(MyJob.

What is durable quartz job?

Here's a quick summary of the other properties which can be defined for a job instance via the JobDetail object: Durability - if a job is non-durable, it is automatically deleted from the scheduler once there are no longer any active triggers associated with it.


1 Answers

Use scheduler.pauseJob() or scheduler.pauseTrigger().

Alternatively you can use the following SQL script:

UPDATE QRTZ_TRIGGERS SET TRIGGER_STATE = "PAUSED"
like image 157
Ricardo Gladwell Avatar answered Oct 01 '22 13:10

Ricardo Gladwell