I am in the process of setting up a website for users to sign up for accounts to access applications on a server running Windows Server 2019 with
IIS, MySQL, PHP, and
The website works fine, the applications work fine, but it becomes rather tedious to have to login via RDP to restart an application if it hangs up, needs a manual update, etc. I have tried searching via google, and came up empty on this, but is there a way via
php, jquery/AJAX, etc., to click a button on my website’s admin panel to send a command to Windows to shutdown and/or restart an application?
Let’s say I have my website located at
C:/webroot/htdocs/" and an application at "C:/servers/server1/server.exe
I want to send a command from the website to close any active windows for
server.exe (the console window(s)) if I hit "Stop Server" on the webpage. If I hit "Start Server" it will send a command to launch the
server.exe program. Finally, if I hit "Restart Server" it will perform the stop action, followed by the start action in a single click.
Is this possible without needing to purchase any type of third-party application?
I know there are cron jobs, but I am not sure exactly how to utilize them, especially in this type of scenario.