A “Recovery state" is a general term; one type of recovery is failure.
A fail-over is a process used by fault tolerance systems commonly used with redundancy (e.g. clustering). The use of quartz during failure when used in clustering and other "nodes" of quartz exists.
Quote documentation :
A failure occurs when one of the nodes fails during the execution of one or more tasks. When a node fails, other nodes detect a condition and identify jobs in the database that were running on the failed node. Any jobs marked for recovery (with the "query recovery" property in JobDetail) will be re-run by the remaining nodes.
A recovery situation is any situation that creates a "Hard-shutdown" (that is, a process that runs in the event of a failure or machine shutdown).
To answer the second question:
If the JVM crashes while the job is running> Quartz will restore the job
(Because an accident is a recovery situation)
if the task completes with an error due to an exception> Quartz will not restore the task
(Since an exception is not a hard trip, a misfire is thrown instead)
See this answer to activate recovery for your jobs.
source share