only if the service is stopped/restarted using the services control panel as opposed to using the script.
if it stops unexpectedly (read crash) no 'onstop' event will run wherever it is (even in the jrun service) set the services to "manual" and have your script start them on startup instaed. if cf is issued ythe command you'll have to be cfexecuting a script to do that anyway so do the same thing you would have to find out about the cf service C:\CFusionMX\runtime\bin\jrunsvc.exe and what hooks that might have to go down that root. Or create a service wrapper in c++ for the jrun service (if you are really game!!) Elliot "Barry Beattie" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] that won't help if the service (or machine is re-started), nor if CF is issued the command to shutdown. edit the batch files that start/stop CF so that calls to cf pages can be made? are there any java events that can be hooked into? barry.b -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Elliot Russo Sent: Friday, 20 August 2004 8:45 AM To: CFAussie Mailing List Subject: [cfaussie] Re: Server.OnStart() event ? whay not create a script (wscript) to do the start (then call a cfm page) and (call a cfm page then ) stop and then you can do what you want. the page could do server scope initialisation (on start) and cleanup (on stop). if cleanup code was long you could set a variable and then refuse any subsequent requests (before cf was actually down) It wont work if it is unmanaged start/stop of course (except first page request could do server initialisation) Some rambling thoughts. Elliot In fact just given me an idea to better manage/disconnect current active sessions before a shutdown. something like "barry.b" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > one idea brought up in > > http://www.mossyblog.com/archives/279.cfm > CFMX and Events? > > was > > Server.OnStart() - on starting CF as a service, etc > Server.OnEnd() - shutdown command, etc > > is it possible to fire an event to run a cf script when the CF service is > started? how about when a shutdown command is issued? > > why? > > sending an "I'm alive" or "going now" email, initialising server variables > to make the first page hit easier, etc. > > any ideas? > > cheers > barry.b > > > > --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/ --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
