Re: CF Start a process - don't wait for it to finish

2004-01-22 Thread Jochem van Dieten
Taco Fleur wrote:
 Yeah, that's true - but it would be a bit of a work-around to get cfexecute
 to call a cf page wouldn't it, at least I can't think of something easy
 straight away.

Use wget:
cfexecute name=wget arguments=-O news.html http://www.cnn.com//

Jochem

-- 
I don't get it
immigrants don't work
and steal our jobs
- Loesje
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: CF Start a process - don't wait for it to finish

2004-01-22 Thread Thomas Chiverton
On Thursday 22 Jan 2004 04:06 am, Taco Fleur wrote:
 What's the best way to start/call a process in CF and not wait for it to
 finish?

Put a '' on the end, if your on Linux/Unix.
-- 
Tom Chiverton 
Advanced ColdFusion Programmer

Tel: +44(0)1749 834997
email: [EMAIL PROTECTED]
BlueFinger Limited
Underwood Business Park
Wookey Hole Road, WELLS. BA5 1AF
Tel: +44 (0)1749 834900
Fax: +44 (0)1749 834901
web: www.bluefinger.com
Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple
Quay, BRISTOL. BS1 6EG.
*** This E-mail contains confidential information for the addressee
only. If you are not the intended recipient, please notify us
immediately. You should not use, disclose, distribute or copy this
communication if received in error. No binding contract will result from
this e-mail until such time as a written document is signed on behalf of
the company. BlueFinger Limited cannot accept responsibility for the
completeness or accuracy of this message as it has been transmitted over
public networks.***
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: CF Start a process - don't wait for it to finish

2004-01-22 Thread Christian Cantrell
On Wednesday, January 21, 2004, at 11:06PM, Taco Fleur wrote:

 What's the best way to start/call a process in CF and not wait for it 
 to
 finish?

I tried once to write a CFTHREAD tag (that spawned a new Java thread in 
which some task would be performed), but it managed to eluded me.
Sounds like a good candidate for a future version of CF, unless someone 
else has some ideas on how to do it.

Christian
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: CF Start a process - don't wait for it to finish

2004-01-22 Thread Thomas Chiverton
On Thursday 22 Jan 2004 17:24 pm, Christian Cantrell wrote:
 I tried once to write a CFTHREAD tag (that spawned a new Java thread in
 which some task would be performed), but it managed to eluded me.

I think there is enough confusion over locking without introducing 
multi-threaded requests, as well as mutl-threaded sessions :-)

-- 
Tom Chiverton 
Advanced ColdFusion Programmer

Tel: +44(0)1749 834997
email: [EMAIL PROTECTED]
BlueFinger Limited
Underwood Business Park
Wookey Hole Road, WELLS. BA5 1AF
Tel: +44 (0)1749 834900
Fax: +44 (0)1749 834901
web: www.bluefinger.com
Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple
Quay, BRISTOL. BS1 6EG.
*** This E-mail contains confidential information for the addressee
only. If you are not the intended recipient, please notify us
immediately. You should not use, disclose, distribute or copy this
communication if received in error. No binding contract will result from
this e-mail until such time as a written document is signed on behalf of
the company. BlueFinger Limited cannot accept responsibility for the
completeness or accuracy of this message as it has been transmitted over
public networks.***
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: CF Start a process - don't wait for it to finish

2004-01-22 Thread Joe Eugene
You could use cfExecute and execute a Java Program (which would by itself) and not
take up any CF Resources.
e.g

cmd.exe java MyBatchProgram

Joe
- Original Message - 
From: Christian Cantrell 
To: CF-Talk 
Sent: Thursday, January 22, 2004 12:24 PM
Subject: Re: CF Start a process - don't wait for it to finish

On Wednesday, January 21, 2004, at 11:06PM, Taco Fleur wrote:

 What's the best way to start/call a process in CF and not wait for it 
 to
 finish?

I tried once to write a CFTHREAD tag (that spawned a new Java thread in 
which some task would be performed), but it managed to eluded me.
Sounds like a good candidate for a future version of CF, unless someone 
else has some ideas on how to do it.

Christian
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: CF Start a process - don't wait for it to finish

2004-01-22 Thread Darron J. Schall
If only it were as simple as:

!--- MyThread.cfc ---
cfcomponent extends=java.lang.Thread
 cffunction name=run access=public returntype=any
 !--- do stuff that you don't need to wait for here, like launching an .exe --- 

 /cffunction
/cfcomponent

!--- .cfm page ---
cfscript
 mt = createObject(Component, MyThread);
 mt.start();// start is a method that would be inherited from Thread
/cfscript

But alas, it's not that simple.CFC's can't inherit from java classes.. 

So... in this situation it might make sense to create a Java wrapper that extends thread, and lets us assign a function to run as the thread.Maybe something with a simple API like this..

cffunction name=someFunction ...

cfscript
 ThreadWrapper = createObject(Java, ThreadWrapper);
 ThreadWrapper.setMethodToRun(someFunction);
 ThreadWrapper.start();
/cfscript

But I'm not sure have Java/CF play together with function references since I've never tried passing one from CF to Java before.If I get a chance, I'll play around with this when I get home from work tonight. 

-d
- Original Message - 
From: Christian Cantrell 
To: CF-Talk 
Sent: Thursday, January 22, 2004 12:24 PM
Subject: Re: CF Start a process - don't wait for it to finish

On Wednesday, January 21, 2004, at 11:06PM, Taco Fleur wrote:

 What's the best way to start/call a process in CF and not wait for it 
 to
 finish?

I tried once to write a CFTHREAD tag (that spawned a new Java thread in 
which some task would be performed), but it managed to eluded me.
Sounds like a good candidate for a future version of CF, unless someone 
else has some ideas on how to do it.

Christian
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-22 Thread Andre Turrettini
make it an attribute of a cfc?Give it its own scope and perhaps an
optional callback function.Maybe cfevent and cfcallback.That would
be nice if used properly.Just because its complex doesnt mean it should be
avoided.
DRE

-Original Message-
From: Thomas Chiverton [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 22, 2004 10:45 AM
To: CF-Talk
Subject: Re: CF Start a process - don't wait for it to finish

On Thursday 22 Jan 2004 17:24 pm, Christian Cantrell wrote:
 I tried once to write a CFTHREAD tag (that spawned a new Java thread in
 which some task would be performed), but it managed to eluded me.

I think there is enough confusion over locking without introducing 
multi-threaded requests, as well as mutl-threaded sessions :-)

-- 
Tom Chiverton 
Advanced ColdFusion Programmer

Tel: +44(0)1749 834997
email: [EMAIL PROTECTED]
BlueFinger Limited
Underwood Business Park
Wookey Hole Road, WELLS. BA5 1AF
Tel: +44 (0)1749 834900
Fax: +44 (0)1749 834901
web: www.bluefinger.com
Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple
Quay, BRISTOL. BS1 6EG.
*** This E-mail contains confidential information for the addressee
only. If you are not the intended recipient, please notify us
immediately. You should not use, disclose, distribute or copy this
communication if received in error. No binding contract will result from
this e-mail until such time as a written document is signed on behalf of
the company. BlueFinger Limited cannot accept responsibility for the
completeness or accuracy of this message as it has been transmitted over
public networks.*** 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: CF Start a process - don't wait for it to finish

2004-01-22 Thread Christian Cantrell
On Thursday, January 22, 2004, at 01:22PM, Andre Turrettini wrote:

 make it an attribute of a cfc?  Give it its own scope and perhaps an
 optional callback function.  Maybe cfevent and cfcallback.  That 
 would
 be nice if used properly.  Just because its complex doesnt mean it 
 should be
 avoided.

A callback was exactly what I had in mind.I can't remember what 
ultimately stopped it from working, but I remember getting close then 
hitting a brick wall.Maybe I'll try again sometime with a fresh 
perspective.

Christian
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




CF Start a process - don't wait for it to finish

2004-01-21 Thread Taco Fleur
What's the best way to start/call a process in CF and not wait for it to
finish?

 
I'm thinking cfhttp but not sure... 

 
For example:

 
A page is called, this page does a NSLOOKUP etc. which takes a bit of time,
but I don;t want to user to have to wait for the process to finish, i.e.
prevent unnecessary delay of the page loading time.

 
Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread Kwang Suh
Apparently, using cfexecute with a timeout of zero will result in CF
executing the program but not wait for it to finish.

-Original Message-
From: Taco Fleur [mailto:[EMAIL PROTECTED] 
Sent: January 21, 2004 9:07 PM
To: CF-Talk
Subject: CF Start a process - don't wait for it to finish

What's the best way to start/call a process in CF and not wait for it to
finish?

I'm thinking cfhttp but not sure... 

For example:

A page is called, this page does a NSLOOKUP etc. which takes a bit of time,
but I don;t want to user to have to wait for the process to finish, i.e.
prevent unnecessary delay of the page loading time.

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: CF Start a process - don't wait for it to finish

2004-01-21 Thread S . Isaac Dealey
The onTap framework has a built-in method of doing this which is
easily portable to other applications. Basically you generated content
then use cfflush to push that content to the user, and perform the
NSLookup (however it's performed) after the flush, so it processes
after the user has already received their content. The onTap framework
does this by providing a default flush and a queue of processes to be
executed in the OnRequestEnd.cfm template. If you have concerns about
users refreshing the page and causing unnecessary overhead on the
system, you might want to include a page redirection (meta tag or
_javascript_ - you can't use cflocation after a cfflush tag) in the
content going to the browser. I use the _javascript_ location.replace()
method which is analogous to cflocation in that it replaces the
current entry in the browser's history, allowing the user to use their
back button normally. The onTap framework has this function
encapsulated into a couple of ColdFusion functions which provide some
additional features.

hth

s. isaac dealey 214-823-9345

team macromedia volunteerhttp://www.macromedia.com/go/team

chief architect, tapestry cmshttp://products.turnkey.to

onTap is open sourcehttp://www.turnkey.to/ontap

 What's the best way to start/call a process in CF and not
 wait for it to
 finish?

 I'm thinking cfhttp but not sure...

 For example:

 A page is called, this page does a NSLOOKUP etc. which
 takes a bit of time,
 but I don;t want to user to have to wait for the process
 to finish, i.e.
 prevent unnecessary delay of the page loading time.

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread Taco Fleur
Yeah, that's true - but it would be a bit of a work-around to get cfexecute
to call a cf page wouldn't it, at least I can't think of something easy
straight away.

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 

-Original Message-
From: Kwang Suh [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 22 January 2004 2:27 PM
To: CF-Talk
Subject: RE: CF Start a process - don't wait for it to finish

Apparently, using cfexecute with a timeout of zero will result in CF
executing the program but not wait for it to finish.

-Original Message-
From: Taco Fleur [mailto:[EMAIL PROTECTED] 
Sent: January 21, 2004 9:07 PM
To: CF-Talk
Subject: CF Start a process - don't wait for it to finish

What's the best way to start/call a process in CF and not wait for it to
finish?

I'm thinking cfhttp but not sure... 

For example:

A page is called, this page does a NSLOOKUP etc. which takes a bit of time,
but I don;t want to user to have to wait for the process to finish, i.e.
prevent unnecessary delay of the page loading time.

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 
_ 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread Taco Fleur
That sounds like it would do the trick - but like you said there are some
concerns, it might be a last resort.
But preferably I'd like it so that once the other process is called it has
nothing to do with the originating page, I know its asking a lot;-))

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 

-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 22 January 2004 2:33 PM
To: CF-Talk
Subject: Re: CF Start a process - don't wait for it to finish

The onTap framework has a built-in method of doing this which is
easily portable to other applications. Basically you generated content
then use cfflush to push that content to the user, and perform the
NSLookup (however it's performed) after the flush, so it processes
after the user has already received their content. The onTap framework
does this by providing a default flush and a queue of processes to be
executed in the OnRequestEnd.cfm template. If you have concerns about
users refreshing the page and causing unnecessary overhead on the
system, you might want to include a page redirection (meta tag or
_javascript_ - you can't use cflocation after a cfflush tag) in the
content going to the browser. I use the _javascript_ location.replace()
method which is analogous to cflocation in that it replaces the
current entry in the browser's history, allowing the user to use their
back button normally. The onTap framework has this function
encapsulated into a couple of ColdFusion functions which provide some
additional features.

hth

s. isaac dealey 214-823-9345

team macromedia volunteerhttp://www.macromedia.com/go/team

chief architect, tapestry cmshttp://products.turnkey.to

onTap is open sourcehttp://www.turnkey.to/ontap

 What's the best way to start/call a process in CF and not
 wait for it to
 finish?

 I'm thinking cfhttp but not sure...

 For example:

 A page is called, this page does a NSLOOKUP etc. which
 takes a bit of time,
 but I don;t want to user to have to wait for the process
 to finish, i.e.
 prevent unnecessary delay of the page loading time.

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn

 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread Kwang Suh
What version of CF?

-Original Message-
From: Taco Fleur [mailto:[EMAIL PROTECTED] 
Sent: January 21, 2004 9:40 PM
To: CF-Talk
Subject: RE: CF Start a process - don't wait for it to finish

Yeah, that's true - but it would be a bit of a work-around to get cfexecute
to call a cf page wouldn't it, at least I can't think of something easy
straight away.

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 

-Original Message-
From: Kwang Suh [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 22 January 2004 2:27 PM
To: CF-Talk
Subject: RE: CF Start a process - don't wait for it to finish

Apparently, using cfexecute with a timeout of zero will result in CF
executing the program but not wait for it to finish.

-Original Message-
From: Taco Fleur [mailto:[EMAIL PROTECTED] 
Sent: January 21, 2004 9:07 PM
To: CF-Talk
Subject: CF Start a process - don't wait for it to finish

What's the best way to start/call a process in CF and not wait for it to
finish?

I'm thinking cfhttp but not sure... 

For example:

A page is called, this page does a NSLOOKUP etc. which takes a bit of time,
but I don;t want to user to have to wait for the process to finish, i.e.
prevent unnecessary delay of the page loading time.

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 
_ 
_ 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread S . Isaac Dealey
That's a good question. IIRC on CF5 it was fairly easy to execute CFM
pages with cfexecute if you knew how. Not sure if there's an easy way
to do it with CFMX. If there is, it's probably different than it was
on CF5. My tendancy would be to shy away from using either method,
just for the sake of having a solution that's not dependant on a given
version of the CF Server. But then I'm also fairly stringent about
making my code as version agnostic as possible.

 What version of CF?

 -Original Message-
 From: Taco Fleur [mailto:[EMAIL PROTECTED]
 Sent: January 21, 2004 9:40 PM
 To: CF-Talk
 Subject: RE: CF Start a process - don't wait for it to
 finish

 Yeah, that's true - but it would be a bit of a work-around
 to get cfexecute
 to call a cf page wouldn't it, at least I can't think of
 something easy
 straight away.

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn

 -Original Message-
 From: Kwang Suh [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 22 January 2004 2:27 PM
 To: CF-Talk
 Subject: RE: CF Start a process - don't wait for it to
 finish

 Apparently, using cfexecute with a timeout of zero will
 result in CF
 executing the program but not wait for it to finish.

 -Original Message-
 From: Taco Fleur [mailto:[EMAIL PROTECTED]
 Sent: January 21, 2004 9:07 PM
 To: CF-Talk
 Subject: CF Start a process - don't wait for it to finish

 What's the best way to start/call a process in CF and not
 wait for it to
 finish?

 I'm thinking cfhttp but not sure...

 For example:

 A page is called, this page does a NSLOOKUP etc. which
 takes a bit of time,
 but I don;t want to user to have to wait for the process
 to finish, i.e.
 prevent unnecessary delay of the page loading time.

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn
_
_
_


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread S . Isaac Dealey
gotcha... in this case I'd recommend a similar solution. Use cfhttp to
execute the other page and then use cflocation to redirect to
someplace else. I _think_ you can execute cfhttp with a timeout of 0
and have the page continue processing immediately without waiting for
the cfhttp content. I'm not certain of this tho -- I don't do a lot of
work with cfhttp, so I'd have to go back to the docs and test it. For
my own work, I have yet to run into any real issues with the way the
framework handles it -- doesn't mean there aren't any, just that I
haven't experienced them. Of course the framework also encapsulates
the processes executing in the onrequestend to insulate them some from
the remaining page.

 That sounds like it would do the trick - but like you said
 there are some
 concerns, it might be a last resort.
 But preferably I'd like it so that once the other process
 is called it has
 nothing to do with the originating page, I know its asking
 a lot;-))

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn

 -Original Message-
 From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 22 January 2004 2:33 PM
 To: CF-Talk
 Subject: Re: CF Start a process - don't wait for it to
 finish

 The onTap framework has a built-in method of doing this
 which is
 easily portable to other applications. Basically you
 generated content
 then use cfflush to push that content to the user, and
 perform the
 NSLookup (however it's performed) after the flush, so it
 processes
 after the user has already received their content. The
 onTap framework
 does this by providing a default flush and a queue of
 processes to be
 executed in the OnRequestEnd.cfm template. If you have
 concerns about
 users refreshing the page and causing unnecessary overhead
 on the
 system, you might want to include a page redirection (meta
 tag or
 _javascript_ - you can't use cflocation after a cfflush tag)
 in the
 content going to the browser. I use the _javascript_
 location.replace()
 method which is analogous to cflocation in that it
 replaces the
 current entry in the browser's history, allowing the user
 to use their
 back button normally. The onTap framework has this
 function
 encapsulated into a couple of ColdFusion functions which
 provide some
 additional features.

 hth

 s. isaac dealey 214-823-9345

 team macromedia volunteer
 http://www.macromedia.com/go/team

 chief architect, tapestry cmshttp://products.turnkey.to

 onTap is open sourcehttp://www.turnkey.to/ontap

 What's the best way to start/call a process in CF and not
 wait for it to
 finish?

 I'm thinking cfhttp but not sure...

 For example:

 A page is called, this page does a NSLOOKUP etc. which
 takes a bit of time,
 but I don;t want to user to have to wait for the process
 to finish, i.e.
 prevent unnecessary delay of the page loading time.

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn


_


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread Taco Fleur
MX

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 

-Original Message-
From: Kwang Suh [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 22 January 2004 2:58 PM
To: CF-Talk
Subject: RE: CF Start a process - don't wait for it to finish

What version of CF?

-Original Message-
From: Taco Fleur [mailto:[EMAIL PROTECTED] 
Sent: January 21, 2004 9:40 PM
To: CF-Talk
Subject: RE: CF Start a process - don't wait for it to finish

Yeah, that's true - but it would be a bit of a work-around to get cfexecute
to call a cf page wouldn't it, at least I can't think of something easy
straight away.

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 

-Original Message-
From: Kwang Suh [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 22 January 2004 2:27 PM
To: CF-Talk
Subject: RE: CF Start a process - don't wait for it to finish

Apparently, using cfexecute with a timeout of zero will result in CF
executing the program but not wait for it to finish.

-Original Message-
From: Taco Fleur [mailto:[EMAIL PROTECTED] 
Sent: January 21, 2004 9:07 PM
To: CF-Talk
Subject: CF Start a process - don't wait for it to finish

What's the best way to start/call a process in CF and not wait for it to
finish?

I'm thinking cfhttp but not sure... 

For example:

A page is called, this page does a NSLOOKUP etc. which takes a bit of time,
but I don;t want to user to have to wait for the process to finish, i.e.
prevent unnecessary delay of the page loading time.

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 
_ 
_ 
_ 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread Taco Fleur
Well, that's what I was thinking, but I could do with some confirmation on
that one ;-))

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 

-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 22 January 2004 3:11 PM
To: CF-Talk
Subject: RE: CF Start a process - don't wait for it to finish

gotcha... in this case I'd recommend a similar solution. Use cfhttp to
execute the other page and then use cflocation to redirect to
someplace else. I _think_ you can execute cfhttp with a timeout of 0
and have the page continue processing immediately without waiting for
the cfhttp content. I'm not certain of this tho -- I don't do a lot of
work with cfhttp, so I'd have to go back to the docs and test it. For
my own work, I have yet to run into any real issues with the way the
framework handles it -- doesn't mean there aren't any, just that I
haven't experienced them. Of course the framework also encapsulates
the processes executing in the onrequestend to insulate them some from
the remaining page.

 That sounds like it would do the trick - but like you said
 there are some
 concerns, it might be a last resort.
 But preferably I'd like it so that once the other process
 is called it has
 nothing to do with the originating page, I know its asking
 a lot;-))

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn

 -Original Message-
 From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 22 January 2004 2:33 PM
 To: CF-Talk
 Subject: Re: CF Start a process - don't wait for it to
 finish

 The onTap framework has a built-in method of doing this
 which is
 easily portable to other applications. Basically you
 generated content
 then use cfflush to push that content to the user, and
 perform the
 NSLookup (however it's performed) after the flush, so it
 processes
 after the user has already received their content. The
 onTap framework
 does this by providing a default flush and a queue of
 processes to be
 executed in the OnRequestEnd.cfm template. If you have
 concerns about
 users refreshing the page and causing unnecessary overhead
 on the
 system, you might want to include a page redirection (meta
 tag or
 _javascript_ - you can't use cflocation after a cfflush tag)
 in the
 content going to the browser. I use the _javascript_
 location.replace()
 method which is analogous to cflocation in that it
 replaces the
 current entry in the browser's history, allowing the user
 to use their
 back button normally. The onTap framework has this
 function
 encapsulated into a couple of ColdFusion functions which
 provide some
 additional features.

 hth

 s. isaac dealey 214-823-9345

 team macromedia volunteer
 http://www.macromedia.com/go/team

 chief architect, tapestry cmshttp://products.turnkey.to

 onTap is open sourcehttp://www.turnkey.to/ontap

 What's the best way to start/call a process in CF and not
 wait for it to
 finish?

 I'm thinking cfhttp but not sure...

 For example:

 A page is called, this page does a NSLOOKUP etc. which
 takes a bit of time,
 but I don;t want to user to have to wait for the process
 to finish, i.e.
 prevent unnecessary delay of the page loading time.

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn


_

 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread Matthew Walker
I had been using cfhttp timeout=0 thinking it would timeout immediately.
However it seems if you do this, the tag doesn't time out at all. Just
something to watch out for. 

-Original Message-
From: Taco Fleur [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 22 January 2004 4:07 p.m.
To: CF-Talk
Subject: CF Start a process - don't wait for it to finish

What's the best way to start/call a process in CF and not wait for it to
finish?

I'm thinking cfhttp but not sure... 

For example:

A page is called, this page does a NSLOOKUP etc. which takes a bit of time,
but I don;t want to user to have to wait for the process to finish, i.e.
prevent unnecessary delay of the page loading time.

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn

_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread S . Isaac Dealey
Heh. You'd have to test it. :)

 Well, that's what I was thinking, but I could do with some
 confirmation on
 that one ;-))

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn

 -Original Message-
 From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 22 January 2004 3:11 PM
 To: CF-Talk
 Subject: RE: CF Start a process - don't wait for it to
 finish

 gotcha... in this case I'd recommend a similar solution.
 Use cfhttp to
 execute the other page and then use cflocation to redirect
 to
 someplace else. I _think_ you can execute cfhttp with a
 timeout of 0
 and have the page continue processing immediately without
 waiting for
 the cfhttp content. I'm not certain of this tho -- I don't
 do a lot of
 work with cfhttp, so I'd have to go back to the docs and
 test it. For
 my own work, I have yet to run into any real issues with
 the way the
 framework handles it -- doesn't mean there aren't any,
 just that I
 haven't experienced them. Of course the framework also
 encapsulates
 the processes executing in the onrequestend to insulate
 them some from
 the remaining page.

 That sounds like it would do the trick - but like you
 said
 there are some
 concerns, it might be a last resort.
 But preferably I'd like it so that once the other process
 is called it has
 nothing to do with the originating page, I know its
 asking
 a lot;-))

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn

 -Original Message-
 From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 22 January 2004 2:33 PM
 To: CF-Talk
 Subject: Re: CF Start a process - don't wait for it to
 finish

 The onTap framework has a built-in method of doing this
 which is
 easily portable to other applications. Basically you
 generated content
 then use cfflush to push that content to the user, and
 perform the
 NSLookup (however it's performed) after the flush, so it
 processes
 after the user has already received their content. The
 onTap framework
 does this by providing a default flush and a queue of
 processes to be
 executed in the OnRequestEnd.cfm template. If you have
 concerns about
 users refreshing the page and causing unnecessary
 overhead
 on the
 system, you might want to include a page redirection
 (meta
 tag or
 _javascript_ - you can't use cflocation after a cfflush
 tag)
 in the
 content going to the browser. I use the _javascript_
 location.replace()
 method which is analogous to cflocation in that it
 replaces the
 current entry in the browser's history, allowing the user
 to use their
 back button normally. The onTap framework has this
 function
 encapsulated into a couple of ColdFusion functions which
 provide some
 additional features.

 hth

 s. isaac dealey 214-823-9345

 team macromedia volunteer
 http://www.macromedia.com/go/team

 chief architect, tapestry cmshttp://products.turnkey.to

 onTap is open source
 http://www.turnkey.to/ontap

 What's the best way to start/call a process in CF and
 not
 wait for it to
 finish?

 I'm thinking cfhttp but not sure...

 For example:

 A page is called, this page does a NSLOOKUP etc. which
 takes a bit of time,
 but I don;t want to user to have to wait for the process
 to finish, i.e.
 prevent unnecessary delay of the page loading time.

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn


_


_


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread Taco Fleur
I was afraid of that..

 
After testing it, the answer is NOPE... It sits there and waits...

 
I have one page that makes the call to another page, the timeout is set to 0

 
The other page contains a delay of 8 seconds and then writes a file

 
More ideas needed...

 
Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 

-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 22 January 2004 3:52 PM
To: CF-Talk
Subject: RE: CF Start a process - don't wait for it to finish

Heh. You'd have to test it. :)

 Well, that's what I was thinking, but I could do with some
 confirmation on
 that one ;-))

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn

 -Original Message-
 From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 22 January 2004 3:11 PM
 To: CF-Talk
 Subject: RE: CF Start a process - don't wait for it to
 finish

 gotcha... in this case I'd recommend a similar solution.
 Use cfhttp to
 execute the other page and then use cflocation to redirect
 to
 someplace else. I _think_ you can execute cfhttp with a
 timeout of 0
 and have the page continue processing immediately without
 waiting for
 the cfhttp content. I'm not certain of this tho -- I don't
 do a lot of
 work with cfhttp, so I'd have to go back to the docs and
 test it. For
 my own work, I have yet to run into any real issues with
 the way the
 framework handles it -- doesn't mean there aren't any,
 just that I
 haven't experienced them. Of course the framework also
 encapsulates
 the processes executing in the onrequestend to insulate
 them some from
 the remaining page.

 That sounds like it would do the trick - but like you
 said
 there are some
 concerns, it might be a last resort.
 But preferably I'd like it so that once the other process
 is called it has
 nothing to do with the originating page, I know its
 asking
 a lot;-))

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn

 -Original Message-
 From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 22 January 2004 2:33 PM
 To: CF-Talk
 Subject: Re: CF Start a process - don't wait for it to
 finish

 The onTap framework has a built-in method of doing this
 which is
 easily portable to other applications. Basically you
 generated content
 then use cfflush to push that content to the user, and
 perform the
 NSLookup (however it's performed) after the flush, so it
 processes
 after the user has already received their content. The
 onTap framework
 does this by providing a default flush and a queue of
 processes to be
 executed in the OnRequestEnd.cfm template. If you have
 concerns about
 users refreshing the page and causing unnecessary
 overhead
 on the
 system, you might want to include a page redirection
 (meta
 tag or
 _javascript_ - you can't use cflocation after a cfflush
 tag)
 in the
 content going to the browser. I use the _javascript_
 location.replace()
 method which is analogous to cflocation in that it
 replaces the
 current entry in the browser's history, allowing the user
 to use their
 back button normally. The onTap framework has this
 function
 encapsulated into a couple of ColdFusion functions which
 provide some
 additional features.

 hth

 s. isaac dealey 214-823-9345

 team macromedia volunteer
 http://www.macromedia.com/go/team

 chief architect, tapestry cmshttp://products.turnkey.to

 onTap is open source
 http://www.turnkey.to/ontap

 What's the best way to start/call a process in CF and
 not
 wait for it to
 finish?

 I'm thinking cfhttp but not sure...

 For example:

 A page is called, this page does a NSLOOKUP etc. which
 takes a bit of time,
 but I don;t want to user to have to wait for the process
 to finish, i.e.
 prevent unnecessary delay of the page loading time.

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn


_


_

 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread Kwang Suh
I'm thinking you'd have to write something in Java that would do an
asynchronous http call.

-Original Message-
From: Taco Fleur [mailto:[EMAIL PROTECTED] 
Sent: January 21, 2004 10:36 PM
To: CF-Talk
Subject: RE: CF Start a process - don't wait for it to finish

Well, that's what I was thinking, but I could do with some confirmation on
that one ;-))

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 

-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 22 January 2004 3:11 PM
To: CF-Talk
Subject: RE: CF Start a process - don't wait for it to finish

gotcha... in this case I'd recommend a similar solution. Use cfhttp to
execute the other page and then use cflocation to redirect to
someplace else. I _think_ you can execute cfhttp with a timeout of 0
and have the page continue processing immediately without waiting for
the cfhttp content. I'm not certain of this tho -- I don't do a lot of
work with cfhttp, so I'd have to go back to the docs and test it. For
my own work, I have yet to run into any real issues with the way the
framework handles it -- doesn't mean there aren't any, just that I
haven't experienced them. Of course the framework also encapsulates
the processes executing in the onrequestend to insulate them some from
the remaining page.

 That sounds like it would do the trick - but like you said
 there are some
 concerns, it might be a last resort.
 But preferably I'd like it so that once the other process
 is called it has
 nothing to do with the originating page, I know its asking
 a lot;-))

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn

 -Original Message-
 From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 22 January 2004 2:33 PM
 To: CF-Talk
 Subject: Re: CF Start a process - don't wait for it to
 finish

 The onTap framework has a built-in method of doing this
 which is
 easily portable to other applications. Basically you
 generated content
 then use cfflush to push that content to the user, and
 perform the
 NSLookup (however it's performed) after the flush, so it
 processes
 after the user has already received their content. The
 onTap framework
 does this by providing a default flush and a queue of
 processes to be
 executed in the OnRequestEnd.cfm template. If you have
 concerns about
 users refreshing the page and causing unnecessary overhead
 on the
 system, you might want to include a page redirection (meta
 tag or
 _javascript_ - you can't use cflocation after a cfflush tag)
 in the
 content going to the browser. I use the _javascript_
 location.replace()
 method which is analogous to cflocation in that it
 replaces the
 current entry in the browser's history, allowing the user
 to use their
 back button normally. The onTap framework has this
 function
 encapsulated into a couple of ColdFusion functions which
 provide some
 additional features.

 hth

 s. isaac dealey 214-823-9345

 team macromedia volunteer
 http://www.macromedia.com/go/team

 chief architect, tapestry cmshttp://products.turnkey.to

 onTap is open sourcehttp://www.turnkey.to/ontap

 What's the best way to start/call a process in CF and not
 wait for it to
 finish?

 I'm thinking cfhttp but not sure...

 For example:

 A page is called, this page does a NSLOOKUP etc. which
 takes a bit of time,
 but I don;t want to user to have to wait for the process
 to finish, i.e.
 prevent unnecessary delay of the page loading time.

 Taco Fleur
 Bloghttp://www.tacofleur.com/index/blog/
 http://www.tacofleur.com/index/blog/
 Methodology http://www.tacofleur.com/index/methodology/
 0421 851 786
 Tell me and I will forget
 Show me and I will remember
 Teach me and I will learn


_

 
_ 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: CF Start a process - don't wait for it to finish

2004-01-21 Thread Toby Tremayne
Hi Taco,

use cfschedule with action="" to create a task which runs once at
now() + the scheduler interval to make sure it gets picked up.It
will be stored as a schedule and triggered under a different thread,
while your template goes about it's business.

Toby

Thursday, January 22, 2004, 3:06:44 PM, you wrote:

TF What's the best way to start/call a process in CF and not wait for it to
TF finish?

 
TF I'm thinking cfhttp but not sure... 

 
TF For example:

 
TF A page is called, this page does a NSLOOKUP etc. which takes a bit of time,
TF but I don;t want to user to have to wait for the process to finish, i.e.
TF prevent unnecessary delay of the page loading time.

 
TF Taco Fleur
TF Bloghttp://www.tacofleur.com/index/blog/
TF http://www.tacofleur.com/index/blog/
TF Methodology http://www.tacofleur.com/index/methodology/
TF 0421 851 786
TF Tell me and I will forget
TF Show me and I will remember
TF Teach me and I will learn 

TF
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: CF Start a process - don't wait for it to finish

2004-01-21 Thread Taco Fleur
That surely will do the trick, what a hack... ;-))
I'll give it a try to see how well it functions, cheers...

Taco Fleur
Bloghttp://www.tacofleur.com/index/blog/
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn 

-Original Message-
From: Toby Tremayne [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 22 January 2004 4:21 PM
To: CF-Talk
Subject: Re: CF Start a process - don't wait for it to finish

Hi Taco,

use cfschedule with action="" to create a task which runs once at
now() + the scheduler interval to make sure it gets picked up.It
will be stored as a schedule and triggered under a different thread,
while your template goes about it's business.

Toby

Thursday, January 22, 2004, 3:06:44 PM, you wrote:

TF What's the best way to start/call a process in CF and not wait for it to
TF finish?

TF I'm thinking cfhttp but not sure... 

TF For example:

TF A page is called, this page does a NSLOOKUP etc. which takes a bit of
time,
TF but I don;t want to user to have to wait for the process to finish, i.e.
TF prevent unnecessary delay of the page loading time.

TF Taco Fleur
TF Bloghttp://www.tacofleur.com/index/blog/
TF http://www.tacofleur.com/index/blog/
TF Methodology http://www.tacofleur.com/index/methodology/
TF 0421 851 786
TF Tell me and I will forget
TF Show me and I will remember
TF Teach me and I will learn 

TF 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: CF Start a process - don't wait for it to finish

2004-01-21 Thread Toby Tremayne
use cfschedule with action="" to create a task which runs once at
now() + the scheduler interval to make sure it gets picked up.It
will be stored as a schedule and triggered under a different thread,
while your template goes about it's business.

Toby

Thursday, January 22, 2004, 3:06:44 PM, you wrote:

TF What's the best way to start/call a process in CF and not wait for it to
TF finish?

 
TF I'm thinking cfhttp but not sure... 

 
TF For example:

 
TF A page is called, this page does a NSLOOKUP etc. which takes a bit of time,
TF but I don;t want to user to have to wait for the process to finish, i.e.
TF prevent unnecessary delay of the page loading time.

 
TF Taco Fleur
TF Bloghttp://www.tacofleur.com/index/blog/
TF http://www.tacofleur.com/index/blog/
TF Methodology http://www.tacofleur.com/index/methodology/
TF 0421 851 786
TF Tell me and I will forget
TF Show me and I will remember
TF Teach me and I will learn 

TF
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]