Ricardo Gladwell
Ricardo Gladwell

Reputation: 3787

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?

Upvotes: 13

Views: 21151

Answers (2)

Ricardo Gladwell
Ricardo Gladwell

Reputation: 3787

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

Alternatively you can use the following SQL script:

UPDATE QRTZ_TRIGGERS SET TRIGGER_STATE = "PAUSED"

Upvotes: 32

Tommi
Tommi

Reputation: 8608

Use the pauseJob or pauseJobGroup methods of JobStore.

Upvotes: 1

Related Questions