Changing msg send interval

#1

Hi! Currently I'm using the inject node, but there doesn't seem to be a way to change the send interval without redeploying. Does anyone know a way I can achieve this? Thanks!

0 Likes

#2

This sort of thing might work for you

[{"id":"bc53eb8f.8f3998","type":"inject","z":"ef9a8c2f.8ad12","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":120,"wires":[["b58bdbc6.41a778"]]},{"id":"b58bdbc6.41a778","type":"change","z":"ef9a8c2f.8ad12","name":"","rules":[{"t":"set","p":"delay","pt":"msg","to":"delay","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":120,"wires":[["f04dee82.c227e","83ef79a.0a76288"]]},{"id":"f04dee82.c227e","type":"delay","z":"ef9a8c2f.8ad12","name":"","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":380,"y":220,"wires":[["b58bdbc6.41a778"]]},{"id":"dc02ead5.33d7d8","type":"change","z":"ef9a8c2f.8ad12","name":"","rules":[{"t":"set","p":"delay","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":340,"wires":[[]]},{"id":"9e98993c.ea0e68","type":"inject","z":"ef9a8c2f.8ad12","name":"","topic":"","payload":"1000","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":110,"y":280,"wires":[["dc02ead5.33d7d8"]]},{"id":"1a38a48c.c4ddeb","type":"inject","z":"ef9a8c2f.8ad12","name":"","topic":"","payload":"2000","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":340,"wires":[["dc02ead5.33d7d8"]]},{"id":"83ef79a.0a76288","type":"debug","z":"ef9a8c2f.8ad12","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":650,"y":120,"wires":[]},{"id":"6cad0543.5f29fc","type":"inject","z":"ef9a8c2f.8ad12","name":"","topic":"","payload":"5000","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":400,"wires":[["dc02ead5.33d7d8"]]}]

Simon

1 Like

#3

Hi
had the same issue, got this from Colin
modified it to work

look and change this for your usage ( fill free to ask)
every.txt (3.2 KB)

0 Likes

#4

Many thanks! Both seem like great solutions.

0 Likes