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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restarting the ColdFusion MX Application Service Remotely

Status
Not open for further replies.

Mike179

Programmer
May 3, 2001
7
US
Hi all,

Does anyone know if it's possible to restart the ColdFusion MX Application Service remotely (from another computer)?

I have been searching all over trying to figure it out.

Thanks in advance,

Mike
 
Mike,

not entirely remote, but always usefull is the "net" command in windows... it can be used to manually start and stop services, so to do this through colfusion (e.g. have coldfusion restart itself) you would have something like this:

Code:
  <!--- write a bat file on the fly --->
  <cfSaveContent Variable="MyBatFile">
    net stop "Cold Fusion Application Server"
    net stop "ColdFusion Executive"
    net stop "ColdFusion Graphing Server"
    net stop "ColdFusion Management Service"
    net stop "ColdFusion RDS"
    net stop "ColdFusion Monitoring Service"

    net start "Cold Fusion Application Server"
    net start "ColdFusion Executive"
    net start "ColdFusion Graphing Server"
    net start "ColdFusion Management Service"
    net start "ColdFusion RDS"
    net start "ColdFusion Monitoring Service"
    
    del temp.bat
  </cfSaveContent>
  <!--- create the bat file --->
  <cfFile Action="WRITE" file="#ExpandPath("./temp.bat")#" output="#MyBatFile#">
  <!--- run the bat file --->
  <cfExecute Name="#ExpandPath("./temp.bat")#"></cfExecute>

Thou you would be better off creating a bat file that restarts all the services, and scheduling it in to run in the dead of night everynight (this can easily be done using the at command in dos and should prevent you from having to restart coldfusion at all during the day!)

If like the method, let me know if you have any issues, if anyone has any better ideas, please let me know!

D.


We never fail, we just find that the path to succes is never quite what we thought...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top