mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!--
 | ||
|   Copyright JS Foundation and other contributors, http://js.foundation
 | ||
| 
 | ||
|   Licensed under the Apache License, Version 2.0 (the "License");
 | ||
|   you may not use this file except in compliance with the License.
 | ||
|   You may obtain a copy of the License at
 | ||
| 
 | ||
|   http://www.apache.org/licenses/LICENSE-2.0
 | ||
| 
 | ||
|   Unless required by applicable law or agreed to in writing, software
 | ||
|   distributed under the License is distributed on an "AS IS" BASIS,
 | ||
|   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | ||
|   See the License for the specific language governing permissions and
 | ||
|   limitations under the License.
 | ||
| -->
 | ||
| 
 | ||
| <script type="text/html" data-help-name="inject">
 | ||
| <p>手動もしくは一定間隔でメッセージをフローに注入します。メッセージのペイロードには、文字列、JavaScriptオブジェクト、現在の時刻など、さまざまな値を指定できます。</p>
 | ||
| <h3>出力</h3>
 | ||
| <dl class="message-properties">
 | ||
|     <dt>payload<span class="property-type">各種</span></dt>
 | ||
|     <dd>指定したメッセージペイロード。</dd>
 | ||
|     <dt class="optional">topic <span class="property-type">文字列</span></dt>
 | ||
|     <dd>任意で指定可能なプロパティ。</dd>
 | ||
| </dl>
 | ||
| <h3>詳細</h3>
 | ||
| <p>injectノードを用いることで、指定したペイロード値を用いてフローを開始できます。デフォルトのペイロード値は現在時刻のタイムスタンプを1970年1月1日からの経過ミリ秒で表現した値です。</p>
 | ||
| <p>文字列、数値、真偽値、JavaScriptオブジェクト、フロー/グローバルコンテキストの値などの送出も可能です。</p>
 | ||
| <p> デフォルト設定では、エディタ内に表示されるボタンをクリックすることで、ノードを手動で起動できます。指定間隔もしくはスケジュールに従ってメッセージを送出するように設定することも可能です。</p>
 | ||
| <p>また、フロー開始の際に一度だけメッセージを送出させることもできます。</p>
 | ||
| <p>「<i>時間間隔</i>」に指定可能な値の最大値は、約596時間(もしくは24日)です。一日より長い間隔を扱いたい場合は、電源停止や再起動にも対応可能なスケジューラノードの利用を検討すると良いでしょう。</p>
 | ||
| <p><b>注</b>:「<i>指定した時間間隔、日時</i>」と「<i>指定した日時</i>」オプションは標準的なcronシステムを内部で利用します。したがって「20分」という指定は、その時点から20分後ではなく、毎時きっかり、20分、40分を意味します。現時刻から20分毎を指定するには「<i>指定した時間間隔</i>」オプションを用います。</p>
 | ||
| <p><b>注</b>: 文字列に改行を含めたい場合は、functionノードまたはtemplateノードを使ってペイロードを設定してください。</p>
 | ||
| </script>
 |