src/main/java/com/redislabs/quartz/RedisJobStore.java
/**
	 * Release triggers from a given current state to a given new state, 
	 * if its locking scheduler instance id is non-alive for over 10 minutes.
	 * 
	 *
	 * @param currentState the current orphaned trigger state
	 * @param newState the new state of the orphaned trigger
	 */
Release triggers from a given current state to a given new state,
if its locking scheduler instance id is non-alive for over 10 minutes.

@param currentState the current orphaned trigger state
@param newState the new state of the orphaned trigger
Release triggers from a given current state to a given new state if its locking scheduler instance id is non - alive for over 10 minutes . @param currentState the current orphaned trigger state @param newState the new state of the orphaned trigger
private void releaseOrphanedTriggers(RedisTriggerState currentState, RedisTriggerState newState) {
		final int ALIVE_TIMEOUT = 10 * 60 * 1000; 
		Map<String, Long> instanceIdLastAlive = new HashMap<>();
      try (Jedis jedis = pool.getResource()) {
         lockPool.acquire();
			Set<Tuple> triggerTuples = jedis.zrangeWithScores(currentState.getKey(), 0, -1);
			for (Tuple triggerTuple : triggerTuples) {
				String lockedByInstanceId = jedis.hget(triggerTuple.getElement(), LOCKED_BY);
				if (lockedByInstanceId != null && !lockedByInstanceId.isEmpty()) {
					if (!instanceIdLastAlive.containsKey(lockedByInstanceId)) {
						long lastAliveTime = jedis.exists(lockedByInstanceId) ? Long.parseLong(jedis.get(lockedByInstanceId)) : 0;
						instanceIdLastAlive.put(lockedByInstanceId, lastAliveTime);
					}
					if ((System.currentTimeMillis() - instanceIdLastAlive.get(lockedByInstanceId)) > (ALIVE_TIMEOUT))
						setTriggerState(newState, triggerTuple.getScore(), triggerTuple.getElement());
				}					
			}						
      } catch (JobPersistenceException | NumberFormatException | InterruptedException ex) {
			log.error("could not release orphaned triggers from: " + currentState, ex);
		} finally {
         lockPool.release();
		}		
	}
private void releaseOrphanedTriggers ( RedisTriggerState currentState , RedisTriggerState newState ) { final int ALIVE_TIMEOUT = 10 * 60 * 1000 ; Map < String , Long > instanceIdLastAlive = new HashMap < > ( ) ; try ( Jedis jedis = pool . getResource ( ) ) { lockPool . acquire ( ) ; Set < Tuple > triggerTuples = jedis . zrangeWithScores ( currentState . getKey ( ) , 0 , - 1 ) ; for ( Tuple triggerTuple : triggerTuples ) { String lockedByInstanceId = jedis . hget ( triggerTuple . getElement ( ) , LOCKED_BY ) ; if ( lockedByInstanceId != null && ! lockedByInstanceId . isEmpty ( ) ) { if ( ! instanceIdLastAlive . containsKey ( lockedByInstanceId ) ) { long lastAliveTime = jedis . exists ( lockedByInstanceId ) ? Long . parseLong ( jedis . get ( lockedByInstanceId ) ) : 0 ; instanceIdLastAlive . put ( lockedByInstanceId , lastAliveTime ) ; } if ( ( System . currentTimeMillis ( ) - instanceIdLastAlive . get ( lockedByInstanceId ) ) > ( ALIVE_TIMEOUT ) ) setTriggerState ( newState , triggerTuple . getScore ( ) , triggerTuple . getElement ( ) ) ; } } } catch ( JobPersistenceException | NumberFormatException | InterruptedException ex ) { log . error ( "could not release orphaned triggers from: " + currentState , ex ) ; } finally { lockPool . release ( ) ; } }
Release triggers from a given current state to a given new state,
 if its locking scheduler instance id is non-alive for over 10 minutes.
Release triggers from a given current state to a given new state if its locking scheduler instance id is non - alive for over 10 minutes .
// 10 minutes non-alive scheduler timeout