<p>$B2CF#(B(j5ik2o)$B$5$s(B</p><p>$B$*@$OC$K$J$j$^$9!#$($S$J$G$9!#(B</p><p>$B%5%s%W%k%=!<%9$r:n@.$7$^$7$?$N$G!"$43NG'$N$[$I59$7$/$*4j$$CW$7$^$9!#(B</p><p></p><p>---$B%=!<%9%3!<%I(B---------------</p><p>@Task<br>@CronTrigger(expression = &quot;*/10 * * * * ?&quot;)<br>public class SampleTask {<br>&nbsp;   private int count = 0;<br>
&nbsp;   public Exception exception = null;<br><br>&nbsp;   public void start() {<br>&nbsp;       ++count;<br>&nbsp;       exception = null;<br><br>&nbsp;       log(&quot;------------&quot;);<br>&nbsp;       log(&quot;    start(): COUNT=&quot; + count + &quot;, EXCEPTION=&quot; + exception);<br>
&nbsp;   }<br><br>&nbsp;   public void doExecute() {<br>&nbsp;       log(&quot;doExecute(): COUNT=&quot; + count + &quot;, EXCEPTION=&quot; + exception);<br><br>&nbsp;       if (count % 2 == 0) {<br>&nbsp;           RuntimeException e = new RuntimeException(&quot;COUNT=&quot; + count);<br>
<br>&nbsp;           log(&quot;doExecute(): throw &quot; + e);<br>&nbsp;           throw e;<br>&nbsp;       }<br>&nbsp;   }<br><br>&nbsp;   public void end() {<br>&nbsp;       log(&quot;      end(): COUNT=&quot; + count + &quot;, EXCEPTION=&quot; + exception);<br>
&nbsp;   }<br><br>&nbsp;   private void log(String s) {<br>&nbsp;       // $B%m%0=PNO(B<br>&nbsp;   }<br>}<br></p><p>---$B%m%0(B---------------<br>**I* &lt;2009/12/03 18:30:21.203&gt;         ------------<br>**I* &lt;2009/12/03 18:30:21.203&gt;             start(): COUNT=1, EXCEPTION=null<br>
**I* &lt;2009/12/03 18:30:21.234&gt;         doExecute(): COUNT=1, EXCEPTION=null<br>**I* &lt;2009/12/03 18:30:21.234&gt;               end(): COUNT=1, EXCEPTION=null<br>**I* &lt;2009/12/03 18:30:31.156&gt;         ------------<br>**I* &lt;2009/12/03 18:30:31.156&gt;             start(): COUNT=2, EXCEPTION=null<br>
**I* &lt;2009/12/03 18:30:31.156&gt;         doExecute(): COUNT=2, EXCEPTION=null<br>**I* &lt;2009/12/03 18:30:31.156&gt;         doExecute(): throw java.lang.RuntimeException: COUNT=2<br>**I* &lt;2009/12/03 18:30:31.187&gt;               end(): COUNT=2, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=2<br>
**I* &lt;2009/12/03 18:30:41.156&gt;         ------------<br>**I* &lt;2009/12/03 18:30:41.156&gt;             start(): COUNT=3, EXCEPTION=null<br>**I* &lt;2009/12/03 18:30:41.187&gt;         doExecute(): COUNT=3, EXCEPTION=null<br>**I* &lt;2009/12/03 18:30:41.187&gt;               end(): COUNT=3, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=2<br>
**I* &lt;2009/12/03 18:30:51.156&gt;         ------------<br>**I* &lt;2009/12/03 18:30:51.156&gt;             start(): COUNT=4, EXCEPTION=null<br>**I* &lt;2009/12/03 18:30:51.171&gt;         doExecute(): COUNT=4, EXCEPTION=null<br>**I* &lt;2009/12/03 18:30:51.187&gt;         doExecute(): throw java.lang.RuntimeException: COUNT=4<br>
**I* &lt;2009/12/03 18:30:51.187&gt;               end(): COUNT=4, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=4<br>**I* &lt;2009/12/03 18:31:01.156&gt;         ------------<br>
**I* &lt;2009/12/03 18:31:01.156&gt;             start(): COUNT=5, EXCEPTION=null<br>**I* &lt;2009/12/03 18:31:01.156&gt;         doExecute(): COUNT=5, EXCEPTION=null<br>**I* &lt;2009/12/03 18:31:01.187&gt;               end(): COUNT=5, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=2<br>
**I* &lt;2009/12/03 18:31:11.171&gt;         ------------<br>**I* &lt;2009/12/03 18:31:11.171&gt;             start(): COUNT=6, EXCEPTION=null<br>**I* &lt;2009/12/03 18:31:11.187&gt;         doExecute(): COUNT=6, EXCEPTION=null<br>**I* &lt;2009/12/03 18:31:11.203&gt;         doExecute(): throw java.lang.RuntimeException: COUNT=6<br>
**I* &lt;2009/12/03 18:31:11.203&gt;               end(): COUNT=6, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=6<br>**I* &lt;2009/12/03 18:31:21.171&gt;         ------------<br>
**I* &lt;2009/12/03 18:31:21.171&gt;             start(): COUNT=7, EXCEPTION=null<br>**I* &lt;2009/12/03 18:31:21.187&gt;         doExecute(): COUNT=7, EXCEPTION=null<br>**I* &lt;2009/12/03 18:31:21.203&gt;               end(): COUNT=7, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=2<br>
**I* &lt;2009/12/03 18:31:31.171&gt;         ------------<br>**I* &lt;2009/12/03 18:31:31.171&gt;             start(): COUNT=8, EXCEPTION=null<br>**I* &lt;2009/12/03 18:31:31.187&gt;         doExecute(): COUNT=8, EXCEPTION=null<br>**I* &lt;2009/12/03 18:31:31.203&gt;         doExecute(): throw java.lang.RuntimeException: COUNT=8<br>
**I* &lt;2009/12/03 18:31:31.203&gt;               end(): COUNT=8, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=8<br>**I* &lt;2009/12/03 18:31:41.171&gt;         ------------<br>
**I* &lt;2009/12/03 18:31:41.171&gt;             start(): COUNT=9, EXCEPTION=null<br>**I* &lt;2009/12/03 18:31:41.203&gt;         doExecute(): COUNT=9, EXCEPTION=null<br>**I* &lt;2009/12/03 18:31:41.203&gt;               end(): COUNT=9, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=2<br>
**I* &lt;2009/12/03 18:31:51.171&gt;         ------------<br>**I* &lt;2009/12/03 18:31:51.171&gt;             start(): COUNT=10, EXCEPTION=null<br>**I* &lt;2009/12/03 18:31:51.203&gt;         doExecute(): COUNT=10, EXCEPTION=null<br>**I* &lt;2009/12/03 18:31:51.203&gt;         doExecute(): throw java.lang.RuntimeException: COUNT=10<br>
**I* &lt;2009/12/03 18:31:51.203&gt;               end(): COUNT=10, EXCEPTION=org.seasar.chronos.core.exception.ExecutionRuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: COUNT=10<br><br>-----<br>
</p><p><br></p><br><div><span class="gmail_quote">09/12/03 <b class="gmail_sendername">Junichi Kato</b> &lt;<a href="mailto:j5ik2o@gmail.com">j5ik2o@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
$B$($S$JMM(B<br> $B2CF#(B(j5ik2o)$B$G$9!#(B<br> <br> $BIT6q9gJs9p$"$j$,$H$&$4$6$$$^$9!#(B<br> $B$*<j?t$G$9$,!"IT6q9g$,:F8=$9$k%5%s%W%k%=!<%9$r$$$?$@$$$F$b$h$m$7$$$G$7$g$&$+!)(B<br> <br> <br> 2009$BG/(B12$B7n(B2$BF|(B12:52 Yasutaka Ebina &lt;<a href="mailto:uncanny.chaplin@gmail.com">uncanny.chaplin@gmail.com</a>&gt;:<br>
 <br>&gt; $B$($S$J$H?=$7$^$9!#(B<br> &gt; s2chronos$B$G2<5-$N$h$&$J=hM}$r9T$*$&$H9M$($F$*$j$^$9$,!"(B<br> &gt; 1$BEY(BException$B$,H/@8$9$k$H!"$=$l0J8e(BException$B$,(BDI$B$5$lB3$1$F$7$^$$$^$9!#(B<br> &gt;<br> &gt; $B%?%9%/$r0lDj<~4|(B($BNc$($P(B1$BJ,Kh(B)$B$G5/F0$7!"(B<br> &gt; $B!&(BException$B$,5/$-$F$$$J$1$l$P!"@5>o=*N;%a!<%k$rAw?.$9$k(B<br> &gt; $B!&(BException$B$,5/$-$F$$$l$P!"0[>o=*N;%a!<%k$rAw?.$9$k(B<br>
 &gt; $B$H$$$&=hM}$r9T$$$?$$$N$G$9$,!"(B<br> &gt; 1$BEY(BException$B$,H/@8$9$k$H!"<!2s0J9_$N%?%9%/<B9T;~$K(B<br> &gt; $B0JA0H/@8$7$?(BException$B$,(BDI$B$5$l$F$7$^$7$^$9!#(B<br> &gt;<br> &gt; $B6qBNE*$K$O!"(B<br> &gt; 1$B2sL\<B9T;~!'(B Exception$B$J$7!J@5>o%a!<%k!K(B<br> &gt; 2$B2sL\<B9T;~!'(B Exception$B$"$j!J0[>o%a!<%k!K(B<br> &gt; 3$B2sL\<B9T;~!'(B Exception$B$J$7!J0[>o%a!<%k!K(B<br>
 &gt; $B$H$J$C$F$7$^$$$^$9!#(B<br> &gt;<br> &gt;<br> &gt; start$B%a%=%C%I$G=i4|2=$r9T$&=hM}(B(exception = null)$B$r=q$$$F$_$^$7$?$,!"(B<br> &gt; end$B%a%=%C%I$N%?%$%_%s%0$G:F$S(BException$B$,(BDI$B$5$l$F$7$^$$$^$9!#(B<br> &gt; $B"(%a!<%kAw?.=hM}$O(Bend$B%a%=%C%I$G=hM}$7$F$$$^$9!#(B<br> &gt; $B"(%a!<%kAw?.=hM}$N$H$-$K!"(BException$B$NM-L5$rH=Dj$7$F$$$^$9!#(B<br> &gt;<br>
 &gt;<br> &gt; $B2?$+NI$$BP1~J}K!$,$"$l$P!"65$($F$$$?$@$1$^$9$G$7$g$&$+!#(B<br> &gt; $B59$7$/$*4j$$CW$7$^$9!#(B<br> &gt;<br> &gt;<br> &gt;<br> <br>&gt; _______________________________________________<br> &gt; Seasar-user mailing list<br> &gt; <a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>
 &gt; <a href="https://ml.seasar.org/mailman/listinfo/seasar-user">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br> &gt;<br> &gt;<br> <br> <br> <br> --<br> /**<br>&nbsp;&nbsp;* name&nbsp;&nbsp;: Junichi Kato<br>&nbsp;&nbsp;* email : <a href="mailto:j5ik2o@gmail.com">j5ik2o@gmail.com</a><br>
&nbsp;&nbsp;*<br>&nbsp;&nbsp;* blog&nbsp;&nbsp;: <a href="http://d.hatena.ne.jp/j5ik2o/">http://d.hatena.ne.jp/j5ik2o/</a><br>&nbsp;&nbsp;*<br>&nbsp;&nbsp;* commiting projects :<br>&nbsp;&nbsp;* <a href="http://jiemamy.org/">http://jiemamy.org/</a><br>&nbsp;&nbsp;* <a href="http://s2chronos.sandbox.seasar.org/">http://s2chronos.sandbox.seasar.org/</a><br>
&nbsp;&nbsp;* <a href="http://s2config.sandbox.seasar.org/">http://s2config.sandbox.seasar.org/</a><br>&nbsp;&nbsp;*/<br> _______________________________________________<br> Seasar-user mailing list<br> <a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>
 <a href="https://ml.seasar.org/mailman/listinfo/seasar-user">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br> </blockquote></div><br>