The problem is most likely that once the CF server stops, the thread that called the batch file also dies and so does the batch job.
The simple way around it is to have the CFM page call at.exe and set up a scheduled job to run your batch file. I think you have to set it to run 1 minute in the future to make sure it works, but that's the basic principle. Spike Matt Robertson wrote: > 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" > -- -------------------------------------------- Stephen Milligan Code poet for hire http://www.spike.org.uk Do you cfeclipse? http://cfeclipse.tigris.org ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:189457 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