Misfire Policy

정해진 시간에 Job을 실행하지 못할 경우, 다음 경우에 따라 어떻게 처리할지 결정합니다.
동시에 실행 가능한 Job의 최대 개수 만큼 Job이 실행중이라면, 더 이상 Job을 추가 실행하지 못하며, 아래 정책에 따라 실행여부을 결정합니다.

Trigger의 유형에 따라 3가지의 경우로 나뉩니다.

  1. Cron Trigger인 경우 - 3가지 정책이 가능함.

    • 모두 실행 : no policy
    • 1회 실행 : smart policy, fire now
    • 아무것도 안함 : nothing
    Instruction Meaning
    no policy Trigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY 모두 실행
    smart policy Trigger.MISFIRE_INSTRUCTION_SMART_POLICY 최초 misfire 된것은 실행하나, 이후 misfire된 것은 폐기됨. fire now 과 같음.
    fire now CronTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW 최초 misfire 된것은 실행하나, 이후 misfire된 것은 폐기됨.
    nothing CronTrigger.MISFIRE_INSTRUCTION_DO_NOTHING 아무것도 안함.
  2. Simple Trigger가 고정 반복인 경우

    • 모두 실행 : no policy
    • 실행가능 상태가 되는 대로 실행 : smart policy, now existing
    • 1회 실행 : fire now, now remaining
    • 아무것도 안함 : next existing, next remaining
    Instruction Meaning
    no policy Trigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY 실행가능 상태가 되는대로 job을 실행함.
    smart policy Trigger.MISFIRE_INSTRUCTION_SMART_POLICY 실행가능 상태가 되는대로 job을 실행함. now existing(nothing) 과 같음.
    fire now SimpleTrigger.MISFIRE_INSTRUCTION_FIRE_NOW 최초 misfire 된것은 실행하나, 이후 misfire된 것은 폐기됨. now remaining 과 같음.
    now existing SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT 실행가능 상태가 되는대로 job을 실행함. smart policy 과 같음.
    now remaining SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT 최초 misfire 된것은 실행하나, 이후 misfire된 것은 폐기됨. fire now 과 같음.
    next existing SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT 아무것도 하지 않음. next remaining 과 같음.
    next remaining SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT 아무것도 하지 않음.
  3. Simple Trigger 가 무한 반복인 경우

    • 모두 실행 : no policy
    • 1회 실행 : fire now, now existing, now remaining
    • 아무것도 안함 : smart policy, next existing, next remaining
    Instruction Meaning
    no policy Trigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY 실행가능 상태가 되는대로 job을 실행함.
    smart policy Trigger.MISFIRE_INSTRUCTION_SMART_POLICY 아무것도 하지 않음. next remaining 과 같음.
    fire now SimpleTrigger.MISFIRE_INSTRUCTION_FIRE_NOW 최초 misfire 된것은 실행하나, 이후 misfire된 것은 폐기됨. now remaining 과 같음.
    now existing SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT 최초 misfire 된것은 실행하나, 이후 misfire된 것은 폐기됨. now remaining 과 같음.
    now remaining SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT 최초 misfire 된것은 실행하나, 이후 misfire된 것은 폐기됨.
    next existing SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT 아무것도 하지 않음. next remaining 과 같음.
    next remaining SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT 아무것도 하지 않음.

이러한 정책은 다음 사이트를 참고해서 작성되었습니다.

http://www.nurkiewicz.com/2012/04/quartz-scheduler-misfire-instructions.html
http://quartz-scheduler.org/generated/2.2.1/html/qs-all/
http://quartz-scheduler.org/generated/2.2.1/html/qs-all/#page/Quartz_Scheduler_Documentation_Set%2Fco-trg_simple_triggers.html%23
http://quartz-scheduler.org/generated/2.2.1/html/qs-all/#page/Quartz_Scheduler_Documentation_Set%2Fco-trg_crontriggers.html%23

Java 명령어

C:\apache\apache-tomcat-7.0.57\bin>java
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)

where options include:
    -client       to select the "client" VM
    -server       to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
C:\apache\apache-tomcat-7.0.57\bin>java -X -help
    -Xmixed           mixed mode execution (default)
    -Xint             interpreted mode execution only
    -Xbootclasspath:<directories and zip/jar files separated by ;>
                      set search path for bootstrap classes and resources
    -Xbootclasspath/a:<directories and zip/jar files separated by ;>
                      append to end of bootstrap class path
    -Xbootclasspath/p:<directories and zip/jar files separated by ;>
                      prepend in front of bootstrap class path
    -Xnoclassgc       disable class garbage collection
    -Xincgc           enable incremental garbage collection
    -Xloggc:<file>    log GC status to a file with time stamps
    -Xbatch           disable background compilation
    -Xms<size>        set initial Java heap size
    -Xmx<size>        set maximum Java heap size
    -Xss<size>        set java thread stack size
    -Xprof            output cpu profiling data
    -Xfuture          enable strictest checks, anticipating future default
    -Xrs              reduce use of OS signals by Java/VM (see documentation)
    -Xcheck:jni       perform additional checks for JNI functions
    -Xshare:off       do not attempt to use shared class data
    -Xshare:auto      use shared class data if possible (default)
    -Xshare:on        require using shared class data, otherwise fail.

The -X options are non-standard and subject to change without notice.