Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Restart CF server through any API?

Contributor ,
Mar 29, 2012 Mar 29, 2012

Hi All,

Is there anyway we can restart the coldfusion server through any code or API?

We are having coldfusion MX 7. We do not have access to to the server for restarting. Every time we need to wait for the Administrator to restart it.

Thanks in advance for your help..:)

706
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 29, 2012 Mar 29, 2012
LATEST

This is not an easy question to answer. I will say this. I don’t think there is an Admin API method to stop CF, and even if there was, it could not “start” it (because CF would now be down). So how you deal with this depends as much on how CF is running and on what OS. If this is production, most people on Windows run CF as a service. If on *nix, most run it as a daemon (though I will admit I am far less familiar with that.)

As for running CF as a Windows service, one could argue that you could/would/should restart the Windows service itself. In that case, you could look into any Windows-based way to stop (and/or restart) the service, such as the command line tool, NET STOP servicename and NET START servicename. You could put those in a batch file, of course.

Another thing to note, though, is that if there were a way to somehow kill CF from within CF itself (whether a documented or undocumented way), there is still that need to start it again. CF won’t know, if you “kill” it, that it should start itself again, whether as a service or daemon.

But note that at least with the Windows Service, there is in fact a mechanism in place (a shadow service watching it, the jrunsvc.exe process that you always see running) that will in fact watch the CF service (the jrun.exe process) and if it sees it stop, that will restart the service.

Hope that helps some, while you await ideas from others.

/charlie


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources