# Deploy from command line

**URL:** <https://discourse.nodered.org/t/deploy-from-command-line/15531>\
**Category:** General\
**Created:** [14 September 2019 15:42 UTC](https://discourse.nodered.org/t/deploy-from-command-line/15531 "2019-09-14T15:42:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [14 September 2019 18:24 UTC](https://discourse.nodered.org/t/deploy-from-command-line/15531/4 "2019-09-14T18:24:42Z")

</div>

> [@RogierQ](#):
>
> Now thinking about a cron job to deploy every night to prevent problems

Not sure how to troubleshoot your problem, but wouldn't it be better to fix the issue instead of giving it first aid?

> [@dceejay](#):
>
> a cron job to run `node-red-restart` or `node-red-stop && node-red-start`....

...could always order a reboot from within node-RED itself.

> [@Restart node-RED via dashboard](https://discourse.nodered.org/t/restart-node-red-via-dashboard/15330):
>
> Just tried running node-red-restart through an exec node, and it works well. It shuts down and restarts gracefully according to NR log. (Raspberry Pi installed via official install script) Useful to use remotely or to restart NR after updating nodes, without resorting to cmd prompt. [restart] [{"id":"8497fd50.d66e1","type":"exec","z":"4487e413.bb781c","command":"sudo ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"System Command","x":720,"y":370,"wires":[[],[],…

If you wanted to order a reboot via MQTT, just replace the inject node with a MQTT in node, and possibly a Switch node to watch for the keyword for a reboot.

![reboot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/46c870abe88a2bc5913a28f3c3b955e1acfb7ba6.jpeg)

---

_[View the full topic](https://discourse.nodered.org/t/deploy-from-command-line/15531)._
