Picture of Jason Chui
Automate restart of server in Windows
by Jason Chui - Wednesday, 27 November 2019, 2:37 AM
 

Hi,

I am running an installation of the Adapt Authoring Tool in a Windows 2016 server. To access the server I will remote desktop into it.

 

The server may be restarted due to regular maintenance. I wish to make the server restart automatically upon Windows restarting.

 

If there is no automation, I have to using CLI to:

1) Start MongoDB using: mongod

2) Start the AT using: node server

 

Is there any suggestions as to how to automate the process?

 

Thank you in advance!

Picture of John Niezen
Re: Automate restart of server in Windows
by John Niezen - Wednesday, 27 November 2019, 7:26 AM
 

Hi Jason,

Does your Windows server supports .bat file? I remember we did a similar thing years ago when in my previous company we moved from Unix terminals to Windows. Linking the remote files was done that way, but also setting some profile itmes.

If the .bat is made executable in the root, it should work. Good luck.

John

Picture of Matt Leathes
Re: Automate restart of server in Windows
by Matt Leathes - Wednesday, 27 November 2019, 11:17 AM
 

See the answers to the same question on stackoverflow: https://stackoverflow.com/questions/20445599/auto-start-node-js-server-on-boot