Thanks Steven, we'll check this out. Your experience matches ours; it
appears that the .bat stops when CF does, so the restart doesn't happen when
done that straightforward way.

Brook, are you sure this actually restarts CF? I just tried your .bat code
verbatim here, and CF stops, but doesn't restart.

Dave Merrill


> I think that when ColdFusion executes a command or bat file via CFEXECUTE
> the external script stops when ColdFusion stops.  When ColdFusion
> calls the
> bat file below it gets to the part where the jrun.exe process is
> killed, and
> then because the bat file process is child of the jrun process,
> the bat file
> process also dies.  This would stop your server and then never get to the
> part where it restarts.  That's what happens when I run the proposed bat
> file.
>
> Another solution is to use the Windows AT scheduler service to schedule a
> CFMX stop and a CFMX start in the shortest time in the future as
> possible, 1
> min.  ColdFusion can schedule the stop/start, but Windows will execute the
> commands even if CF is shutdown.
>
> See this for a cfm script that calls AT to restart the service:
> http://www.talkingtree.com/blog/index.cfm?mode=alias&alias=RestartCFMX
>
> -Steven Erat
>
>
> > -----Original Message-----
> > From: Brook Davies
> >
> > =======
> > @echo off
> > cls
> > REM ==========          RESTART CFMX            ===============
> > net stop "Coldfusion MX Application Server"
> > c:
> > cd \CFUSIONMX\bin
> > call C:\CFUSIONMX\bin\cfstop.bat
> > c:\winnt\system32\kill -f jrun.exe
> > c:\winnt\system32\kill -f jrun.exe
> > sleep 2
> > REM call C:\CFUSIONMX\bin\cfstart.bat
> > net start "ColdFusion MX Application Server"
> > REM ===========================================================
> > Exit
> >
> >
> >
> > At 01:19 PM 1/31/2005, you wrote:
> > >I was hopeful that someone had solved this for MX61, but instead I'm
> > >confused. I don't have an 'opt' directory (Windows 2000),
> > and don't find any
> > >files named 'coldfusion.*' that you might be referring to.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192478
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to