Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

restarting a server using cfm

Status
Not open for further replies.

mad01

Programmer
Jul 30, 2000
23
AE
is there a way I can restart a server(win 2000) by creating some cfm page and calling it via a browser?
if any one knows where shall I start from...please let me know...

thanx :) Nescafe
 
Play around with cfexecute and server manager(svrmgr).
Of course necessary permissions need to be present.

If I need to restart cold fusion I use terminal services to
reach svrmgr and stop/start the cold fusion services.

~Dave
 
I'm not up an expert on Win2000, but I know it's got alot of similarities as NT, and here's you you could do it in NT.

Create a txt file and put the following 2 lines in it

[tt]net stop "Cold Fusion Application Server"
net start "Cold Fusion Application Server"[/tt]

Save the txt file as cf_whack.bat


Then create a cfm page with the following line in it.
<CFEXECUTE NAME=&quot;C:\AbsolutePathTo\cf_whack.bat&quot; TIMEOUT=&quot;1&quot;/>

Keep in mind, that this page will show up as an error, because you've stopped and started the CF server while it's being processed, but the code will execute. - tleish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top