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 [mailto:[EMAIL PROTECTED] 
> Sent: Monday, January 31, 2005 4:23 PM
> To: CF-Talk
> Subject: RE: Restart CFMX with CFML?
> 
> =======
> @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.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192467
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