How to trigger an automatic deploy at a specific time in Node-RED

Hi everyone,

I’m looking for a way to perform an automatic deploy of my Node-RED flows at a precise time (for example every day at 08:00 PM).

To be clear:

  • I don’t want to use an Inject node (I’m not trying to trigger a flow).
  • I really want a full auto-deploy of the flows, as if I pressed the Deploy button manually.
  • Ideally this could be done using a script, Node-RED internal setting, or some kind of scheduled command.
  • I’m still using Dashboard 1.0 and I don’t want to migrate to Dashboard 2.0 for the moment.

Does anyone know if this is possible, or if there's a workaround to trigger a scheduled deploy automatically?

Thanks a lot for your help!

You could use a cron job to restart node red.

Would that deploy before restarting?

No, but what @karlgotbread has asked for does not make sense to me.

@karlgotbread, you can only click the Deploy button if you have a modified flow that you wish to send from the browser to the node-red server, so can you describe in more detail exactly what you are trying to achieve?

1 Like

Good point, Any non deployed changes are in the browser not the editor.

Let me clarify what I’m trying to achieve.

I know that the Deploy button is normally used only when the flow has been modified in the editor.
However, in my case, I’m using ui_template widgets with custom JavaScript and custom charts on Dashboard 1.0, and sometimes the dashboard does not initialize correctly (especially after long runtimes, or after switching between different dashboards).

The only thing that consistently fixes the issue is pressing Deploy, even if nothing has changed in the flow.

This is why I’m trying to achieve an automatic “deploy-like” refresh every day at a precise time (for example at 8:00 PM), without having to touch the editor.

I’m not trying to push modified flows, I just want to force Node-RED to reload the UI and reinitialize the dashboard components automatically.

You cannot press Deploy if nothing has changed, it is not enabled.

From the failure state check whether anything is consuming large amounts of CPU. The problem you have sounds exactly like what one would see if you are loading up charts with many thousands of data points, in which case either the node-red server or the browser (or both) may hang up using large amounts of CPU.