A simple sub-flow that triggers once when the server first starts-up. The trigger sends an empty payload but has the topic 'server-startup' and has a msg.startupDate property.
-
-
Save dhartveld/263919512c0df2da7eea to your computer and use it in GitHub Desktop.
Server Startup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"bd88a321.42776","type":"subflow","name":"On Startup","in":[],"out":[{"x":454,"y":160,"wires":[{"id":"dbe754fd.2418a8","port":0}]}]},{"id":"c61021cd.39efe","type":"inject","name":"On Startup","topic":"server-startup","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":148,"y":160,"z":"bd88a321.42776","wires":[["dbe754fd.2418a8"]]},{"id":"dbe754fd.2418a8","type":"function","name":"Save startup date","func":"msg.startupDate = msg.payload;\nmsg.payload = \"\";\nreturn msg;","outputs":1,"noerr":0,"x":318,"y":160,"z":"bd88a321.42776","wires":[[]]},{"id":"5ca75d76.a358a4","type":"subflow:bd88a321.42776","name":"","x":261,"y":141,"z":"ba13aa9d.45ec58","wires":[["acf315a4.530ce8"]]}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment