Maybe it's because CF still has a "handle" on the process.

If you get rid of the timeout, CF will process CFEXECUTE asynchronously,
meaning that CF won't wait for the spawned process to return to CF.

I would try removing the timeout attribute and see if that works.

If not, you might try adding some sort of delay in the batch file.

M!ke 

-----Original Message-----
From: Matt Robertson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 05, 2005 4:25 PM
To: CF-Talk
Subject: Restart CF via CFEXECUTE calling a batch file?

So I am having some trouble with one of my servers, and, as an emergency
measure,  wanted to come up with a way to restart CF 6.1 via a web-based
file I can call from a browser.

So I wrote a little file that uses CFEXECUTE to call a batch file that
in turn issues a NET STOP of the CF service, followed by a NET START. 
 Seemed simple enough.

Only trouble is that only the NET STOP runs.  It does a great job of
killing the service but for some reason the batch file doesn't finish
executing.

Other than trying to do this in the first place, where did I go wrong?
alternatives?

the call: 

<cfexecute 
   name="z:\foo\ReCF.bat"
   timeout="10">
</cfexecute>

and the batch file (not using the ODBC services):

@echo on
net stop "ColdFusion MX Application Server"
net start "ColdFusion MX Application Server"

--
--Matt Robertson--
President, Janitor
MSB Web Systems
mysecretbase.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Protect your mail server with built in anti-virus protection. It's not only 
good for you, it's good for everybody.
http://www.houseoffusion.com/banners/view.cfm?bannerid=39

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