How to start a periodical task from an external command?

Hi everyone,
as the title of this topic says, I want to start a periodical task on Node-RED, triggering it from an external command.
I made an Android app and I'm gonna send an MQTT signal from it. When my flow receives this signal, it has to start a task that repeats every 15 minutes. How can I do it?
I obviously can't use the inject node. I tried to use the trigger node, but I managed to repeat the task only twice with it.

the cron-plus node is fully automatable.

  • add a cron expression that runs every 15m
  • send a topic of "stop" to it to stop it
  • send a topic of "start" to it to start it

See the built in help on the side bar for more details & see the built in examples (menu, import, examples, cron-plus)

how do you have the trigger node configured ? It should be possible no problem.

send any payload to start it, and send msg.reset to stop it.

Yeah, it should be......I configured it exactly as in your photo, but it doesn't work. I don't know why. I'm testing the cron-plus solution at the moment

what about it doesn't work ? It doesn't start ? it doesn't repeat ? It doesn't stop ?
a simple test case is working here...

1 Like

As I said in the topic description, I managed to repeat the flow only twice, using trigger node.
I'll try this flow, maybe I set up something wrong. Anyway the cron-plus node is what I was looking for. The possibility to start, pause, resume and remove the schedules is awesome and very helpful for me.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.