The purpose of the second process is to delete the "flag" file, then stop.
The long running process will then stop when it detects that the flag file
is NOT existing...
Adding a FileExists probably slows down the whole thing a bit, but you
could do it every 100 iterations or so, depending on how granular of
control you want in your script abort...
> but wouldn't your abort be a seperate thread from the long running one?
> (i.e. you start the long running process and then you hit your abort button
> which just stops the page from running again and starting a second long
> running process). At least that's how I'm reading what you've laid out
>
> Bryan Stevenson B.Comm.
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> t. 250.920.8830
> e. [EMAIL PROTECTED]
>
> ---------------------------------------------------------
> Macromedia Associate Partner
> www.macromedia.com
> ---------------------------------------------------------
> Vancouver Island ColdFusion Users Group
> Founder & Director
> www.cfug-vancouverisland.com
> ----- Original Message -----
> From: "Tony Schreiber" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, June 09, 2003 2:13 PM
> Subject: Mechanisms for stopping a running script
>
>
> > I've been thinking about some ideas on how to stop running scripts, like
> > an ABORT button. This is the first thought I came up with. Any other
> > ideas? This comes up for me because I have several LONG running scripts
> > that occassionally, I might want to stop w/o having to bounce the cf
> > server to do so...
> >
> > <!--- check if aborting (run when the abort button is pressed) --->
> > <CFIF VAL(abort)>
> > <CFFILE action="dete" file="flag.txt">
> > <CFABORT>
> > <!--- this just ends the page processing from the button press --->
> > </CFIF>
> >
> > <!--- start of script --->
> > <CFFILE action="write" file="flag.txt" content="1">
> >
> > <!--- create abort button --->
> > <FORM>
> > <INPUT TYPE="hidden" NAME="abort" VALUE="1">
> > <INPUT TYPE="submit" VALUE="ABORT">
> > </FORM>
> >
> > <CFLOOP>
> >
> > ...main script processing...
> >
> > <!--- test if aborting --->
> > <CFIF NOT FileExists('flag.txt')>
> > <CFABORT>
> > </CFIF>
> >
> > </CFLOOP>
> >
> > <!--- end script --->
> >
> > Tony Schreiber, Senior Partner Man and Machine, Limited
> > mailto:[EMAIL PROTECTED] http://www.technocraft.com
> >
> > http://www.is300.net The Enthusiast's Home of the Lexus IS300 since 1999
> > ***** PARTS STORE NOW OPEN ***** http://www.is300.net/store/
> > http://www.simplemessageboard.com Free Forum Software for Cold Fusion
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4