ColdFusionでsleepをさせるには

ColdFusionで、ループの処理などを行っているとウェイトを入れたくなるときがあります。ColdFusionの関数にはウェイトを入れる関数がないので、JavaのThreadクラスのオブジェクトを作り、それを使ってウェイトを入れる必要があります。具体的には以下のコード

<!--- 5秒間スリープ --->
<cfset thread = CreateObject("java", "java.lang.Thread") />
<cfset thread.sleep(5000) />

One thought on “ColdFusionでsleepをさせるには

  1. こんな方法もありました。
    Linuxの場合だけれども。
    <cfexecute name=”sleep” arguments=”5″ timeout=”60″></cfexecute>

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>