°ü·Ã ¸µÅ©·Î ±âÀçÇÑ ½ºÅÿÀ¹öÇ÷ο쿡´Â À߸øµÈ ´äº¯ÀÌ Ã¤Åà µÇ¾î ÀÖ´Ù.
äÅÃµÈ ´äº¯ÀÇ ¾Æ·¡ ´äº¯ (nikhil7610 °¡ ÀÛ¼ºÇÑ) ÀÌ Á¤È®ÇÑ ´äº¯À̸ç, ±×¿¡ ´ëÇÑ ¼³¸íÀº ¾Æ·¡¿Í °°´Ù.
¡Ü "fixedRate" : waits for X millis from the start of previous execution before starting next execution.
If current execution exceeds 'fixedRate' interval, the next execution is queued, but only next one.
It will not create series of queued executions
ÀÌÀü ÀÛ¾÷ÀÇ "½ÃÀÛ ½Ã°£" À» ±âÁØÀ¸·Î X ¹Ð¸®Ãʸ¸Å ´ë±â ÈÄ ´ÙÀ½ ÀÛ¾÷À» ½ÃÀÛÇÑ´Ù.
ÀÌÀü ÀÛ¾÷ÀÌ ³¡³ªÁö ¾ÊÀº °æ¿ì, ´ÙÀ½ ÀÛ¾÷Àº Å¥¿¡ µé¾î°¡°Ô µÇ¸ç ÀÌ´Â ´ÙÀ½ 1°³ÀÇ ÀÛ¾÷¿¡¸¸ ÇØ´çµÈ´Ù.
(Áï ÀÌÀü ÀÛ¾÷ÀÌ ¾Æ¹«¸® ¿À·¡ °É·Áµµ ¿©·¯ °³ÀÇ ÀÛ¾÷ÀÌ Å¥¿¡ µé¾î°¡Áö´Â ¾Ê´Â´Ù)
¡Ü "fixedDelay" : waits for X millis from the end of previous execution before starting next execution.
Doesn't matter how much time current execution is taking,
the next execution is started after adding 'fixedDelay' interval to end time of current execution.
It will not queue next execution.
ÀÌÀü ÀÛ¾÷ÀÇ "Á¾·á ½Ã°£" À» ±âÁØÀ¸·Î X ¹Ð¸®Ãʸ¸Å ´ë±â ÈÄ ´ÙÀ½ ÀÛ¾÷À» ½ÃÀÛÇÑ´Ù.
ÀÌÀü ÀÛ¾÷ÀÌ ¾Æ¹«¸® ¿À·¡ °É¸°´Ù ÇÏ´õ¶óµµ, ´ÙÀ½ ÀÛ¾÷Àº ÀÌÀü ÀÛ¾÷ÀÌ ³¡³ ÈÄ fixedDelay ½Ã°£¸¸Å ´ë±âÇÏ°í ½ÇÇàµÈ´Ù.
fixedRate ÀÛ¾÷°ú´Â ´Þ¸® ´ÙÀ½ ÀÛ¾÷ÀÌ Å¥¿¡ µé¾î°¡Áø ¾Ê´Â´Ù.
¡Ü fixedDelay
fixedDelay : 1000 ms
thread sleep : 3000 ms
seconds +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---->
0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16
ITERATION #1 |--------------|
ITERATION #2 |--------------|
ITERATION #3 |--------------|
ITERATION #4 |--------------|
...
¡Ü fixedRate
fixedRate : 1000 ms
thread sleep : 3000 ms
seconds +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---->
0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16
ITERATION #1 |----+---------|
¡è queued next schedule
ITERATION #2 |----+---------|
¡è queued next schedule
ITERATION #3 |----+---------|
¡è queued next schedule
ITERATION #4 |----+---------|
¡è queued next schedule
...
¡Ü fixedRate
fixedRate : 3000 ms
thread sleep : 2000 ms
seconds +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---->
0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16
ITERATION #1 |---------|
ITERATION #2 |---------|
ITERATION #3 |---------|
ITERATION #4 |---------|
...
½ºÄÉÁÙ ÀÛ¾÷À» ÀÌÀü ÀÛ¾÷°ú »ó°ü¾øÀÌ ÁöÁ¤µÈ ÁֱⰡ µÇ¸é ¹Ù·Î ¼öÇàÇÏ°Ô ÇÏ·Á¸é
@Async + @Scheduled ¾î³ëÅ×À̼ÇÀ» Á¶ÇÕÇÏ¿© ½ºÄÉÁÙÀÌ ºñµ¿±â·Î ¼öÇàµÇ°Ô ÇÏ¸é µÈ´Ù.
½ºÄÉÁÙÀ» ºñµ¿±â·Î ¼öÇàÇϸé, @EnableAsync ¿Í ½º·¹µå Ç® ¼³Á¤ÀÌ µÇ¾î ÀÖ´Ù´Â Àüü ÇÏ¿¡ ¾Æ·¡¿Í °°ÀÌ µ¿ÀÛÇÑ´Ù.
¡Ü fixedRate + @Async
fixedRate : 1000 ms
thread sleep : 3000 ms
seconds +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---->
0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16
ITERATION #1 |----+---------|
ITERATION #2 |----+---------|
ITERATION #3 |----+---------|
ITERATION #4 |----+---------|
...
¡Ü fixedDelay + @Async
fixedDelay : 1000 ms
thread sleep : 3000 ms
seconds +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+---->
0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16
ITERATION #1 |--------------|
ITERATION #2 |--------------|
ITERATION #3 |--------------|
ITERATION #4 |--------------|
...
|