mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
let inject "between time" also fire at start - Plus new info
This commit is contained in:
parent
b1e3fc5761
commit
9928e8562a
@ -150,22 +150,28 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="text/x-red" data-help-name="inject">
|
<script type="text/x-red" data-help-name="inject">
|
||||||
<p>Pressing the button on the left side of the node allows a message on a topic
|
<p>Injects a message with an optional topic into a flow by pressing the button on the left side of the node.
|
||||||
to be injected into the flow.</p>
|
Several payload javascript types can be injected at various intervals into the flow.</p>
|
||||||
<p>The payload defaults to the current time in millisecs since 1970, but can
|
<p><b>Outputs</b></p>
|
||||||
also be set to various other javascript types.</p>
|
<ul>
|
||||||
<p>The repeat function allows the payload to be sent on the required schedule.</p>
|
<li><code>msg.payload</code> - <i>timestamp | string | number | boolean | JSON | flow | global</i></li>
|
||||||
<p>The <i>Inject once at start</i> option actually waits a short interval before firing
|
<li><code><i>msg.topic</i></code> - <i>string</i> - optional meta-data</li>
|
||||||
to give other nodes a chance to instantiate properly.</p>
|
</ul>
|
||||||
<p>The <i>Flow</i> and <i>Global</i> options allow one to inject a flow or global
|
<p><b>Details</b></p>
|
||||||
context value.
|
<p>The Inject node can initiate a flow with a specific payload value.
|
||||||
</p>
|
The default payload is a timestamp of the current time in millisecs since 1970.
|
||||||
<p><b>Note: </b>"Interval between times" and "at a specific time" uses cron.
|
Strings, numbers, JSON objects, and booleans types can be injected.
|
||||||
This means that 20 minutes will be at the next hour, 20 minutes past and
|
The <i>Flow</i> and <i>Global</i> options allow the user to inject a flow or global context value.</p>
|
||||||
40 minutes past - not in 20 minutes time. If you want every 20 minutes
|
<p>The repeat function allows the payload to be sent on the required schedule - <i>Once</i>, at a <i>set interval</i>,
|
||||||
from now - use the "interval" option.</p>
|
between certain times (local time where the Node-RED process is running), or at a <i>specific interval</i>.</p>
|
||||||
<p><b>Note: </b>all string input is escaped. To add a carriage return to a string
|
|
||||||
you should use a following function.</p>
|
<p>The <i>Inject once at start</i> option actually waits a short interval before firing to give other nodes a chance to instantiate properly.</p>
|
||||||
|
|
||||||
|
<p><b>Note</b>: <i>"Interval between times"</i> and <i>"at a specific time"</i> uses cron.
|
||||||
|
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 "interval" option.</p>
|
||||||
|
|
||||||
|
<p><b>Note</b>: all string input is escaped. To add a carriage return to a string you should use a following function.</p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -260,7 +266,7 @@
|
|||||||
var id = $("#inject-time-type-select").val();
|
var id = $("#inject-time-type-select").val();
|
||||||
$(".inject-time-row").hide();
|
$(".inject-time-row").hide();
|
||||||
$("#inject-time-row-"+id).show();
|
$("#inject-time-row-"+id).show();
|
||||||
if ((id == "none") || (id == "interval")) {
|
if ((id == "none") || (id == "interval") || (id == "interval-time")) {
|
||||||
$("#node-once").show();
|
$("#node-once").show();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user