NickName:Salvatore Raccardi Ask DateTime:2019-01-20T04:43:49 How to run a .bat file on a node server? I was wondering if you can perform an automatic restart of a server made with node. My idea was to run a .bat file via node that rebooted the server. It's possible to do it? Copyright Notice:Content Author:「Salvatore Raccardi」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.Link to original article:https://stackoverflow.com/questions/54271232/how-to-run-a-bat-file-on-a-node-server Answers Rami ZK 2019-01-19T20:50:39 You can use exec as follows \n\nconst { exec } = require('child_process');\nexec('shutdown -s -t 0') ; // change command according to your system \n\n\ncheck this question for more details on exec \n\nExecute a command line binary with Node.js",