Sometimes we may need to restart our server because of some problems. Specially on windows based servers this would be headache if you have a remote server. Mainly we can use tools like "Terminal Services", "PC Anywhere", or "VNC" etc. But there would be also to reach these interfaces.
I would like to suggest a simple page which may help to restart you server via ColdFusion.
We can use command line as following via CFEXECUTE tag.
<cfexecute
name="C:\Windows\system32\shutdown.exe"
arguments="-r -f">
</cfexecute>
In case of not having "shutdown.exe" in some systems, we can use also IIS to restart the server as following.
<cfexecute
name="C:\Windows\system32\iisreset.exe"
arguments="/reboot">
</cfexecute>
What you can do is put this code somewhere in the server with password protection (of course!) and running them if you need to restart the server.
There are no comments for this entry.
[Add Comment] [Subscribe to Comments]