You could use a dsm node:
[{"id":"a26cd0b7.90aef","type":"dsm","z":"66646ca8.e97654","name":"random trigger","sm_config":"{\n \"currentState\": \"stopped\",\n \"states\": {\n \"stopped\": {\n \"start\": \"running\"\n },\n \"running\": {\n \"running\": \"running\",\n \"stop\": \"stopped\"\n }\n },\n \"data\": {\n \"minDelay\": 1,\n \"maxDelay\": 5\n },\n \"methods\": {\n \"start\": [\n \"resume('running', msg);\"\n ],\n \"running\": [\n \"sm.delay = Math.random() * (sm.data.maxDelay - sm.data.minDelay) + sm.data.minDelay;\",\n \"msg.delay = 'delay '+ sm.delay.toFixed(2);\",\n \"timeout.delay = setTimeout(function() {\",\n \" node.send(msg);\",\n \" resume('running',msg);\",\n \"},sm.delay*1000);\"\n ],\n \"stop\": [\n \"clearTimeout(timeout.delay);\",\n \"msg.delay = 'stopped';\"\n ],\n \"onTransition\": [\n \"output = false;\"\n ],\n \"status\": {\n \"fill\": {\n \"get\": \"sm.currentState === 'running' ? 'green' : 'red';\"\n },\n \"shape\": \"dot\",\n \"text\": {\n \"get\": \"msg.delay;\"\n }\n }\n }\n}","x":330,"y":320,"wires":[["fdb8b530.787a38"]]},{"id":"c78a24cc.f507f8","type":"inject","z":"66646ca8.e97654","name":"start","topic":"start","payload":"random trigger","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":320,"wires":[["a26cd0b7.90aef"]]},{"id":"fdb8b530.787a38","type":"debug","z":"66646ca8.e97654","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":490,"y":320,"wires":[]},{"id":"894976da.9dfca8","type":"inject","z":"66646ca8.e97654","name":"stop","topic":"stop","payload":"random trigger","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":360,"wires":[["a26cd0b7.90aef"]]}]