mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			2.3 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>Injects a message into a flow either manually or at regular intervals. The message
 | |
| payload can be a variety of types, including strings, JavaScript objects or the current time.</p>
 | |
| <h3>Outputs</h3>
 | |
| <dl class="message-properties">
 | |
|     <dt>payload<span class="property-type">various</span></dt>
 | |
|     <dd>The configured payload of the message.</dd>
 | |
|     <dt class="optional">topic <span class="property-type">string</span></dt>
 | |
|     <dd>An optional property that can be configured in the node.</dd>
 | |
| </dl>
 | |
| <h3>Details</h3>
 | |
| <p>The Inject node can initiate a flow with a specific payload value.
 | |
| The default payload is a timestamp of the current time in millisecs since January 1st, 1970.</p>
 | |
| <p>The node also supports injecting strings, numbers, booleans, JavaScript objects, or flow/global context values.</p>
 | |
| <p>By default, the node is triggered manually by clicking on its button within the editor. It can also be set to
 | |
| inject at regular intervals or according to a schedule.</p>
 | |
| <p>It can also be configured to inject once each time the flows are started.</p>
 | |
| <p>The maximum <i>Interval</i> that can be specified is about 596 hours / 24 days. However if you are looking at intervals
 | |
| greater than one day you should consider using a scheduler node that can cope with power outages and restarts.</p>
 | |
| <p><b>Note</b>: The <i>"Interval between times"</i> and <i>"at a specific time"</i> options use the standard cron system.
 | |
| This means that 20 minutes will be at the next hour, 20 minutes past and 40 minutes past - not in 20 minutes time.
 | |
| If you want every 20 minutes from now - use the <i>"interval"</i> option.</p>
 | |
| <p><b>Note</b>: To include a newline in a string you must use a Function node to create the payload.</p>
 | |
| </script>
 |