Node-REDが起動の度にフローを実行したい。
これは、コンテキスト変数を初期化したり、Node-REDが再起動されたという通知を送るためにも使われます。
起動時に1回実行するよう設定された Inject
ノードを使用します。
[{"id":"e60b12c1.93bb3","type":"inject","z":"535331d8.55c1f","name":"","topic":"","payload":"Started!","payloadType":"str","repeat":"","crontab":"","once":true,"x":140,"y":540,"wires":[["9b1d7727.56d0f8"]]},{"id":"9b1d7727.56d0f8","type":"debug","z":"535331d8.55c1f","name":"","active":true,"console":"false","complete":"false","x":410,"y":540,"wires":[]}]
起動時に実行されるよう設定すると、Inject
ノードは
デプロイ後、数百ミリ秒後に自動的に実行されます。
この数百ミリ秒の遅延は、この時点までに残りのフローが作成され開始されるために使用されます。
このノードはデプロイされるたびに実行されます。
Node-RED: Low-code programming for event-driven applications.
Copyright OpenJS Foundation and Node-RED contributors. All rights reserved. The OpenJS Foundation has registered trademarks and uses trademarks. For a list of trademarks of the OpenJS Foundation, please see our Trademark Policy and Trademark List. Trademarks and logos not indicated on the list of OpenJS Foundation trademarks are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
The OpenJS Foundation | Terms of Use | Privacy Policy | OpenJS Foundation Bylaws | Trademark Policy | Trademark List | Cookie Policy