> > > What would be the best way to dealy the execution of a cf > > > tamplate by x amount of seconds? > > > > Simplest way: > > > > <CFSET Sleep=5> > > <CFSET Start=GetTickCount()> > > <CFTRY> > > <CFLOCK SCOPE="SESSION" TIMEOUT="#Sleep#" TYPE="READONLY"> > > <CFLOCK SCOPE="SESSION" TIMEOUT="#Sleep#" TYPE="EXCLUSIVE"> > > </CFLOCK> > > </CFLOCK> > > <CFCATCH></CFCATCH> > > </CFTRY> > > <CFSET End=GetTickCount()> > > <CFSET Elapsed=End-Start> > > <CFOUTPUT>Elapsed: #Elapsed#ms</CFOUTPUT> > > > > Of course, this will lock your entire session. Anything else > > trying to obtain a lock in that sessionwill also be delayed. > > That's not going to do anything. The TIMEOUT attribute of > CFLOCK doesn't specify the length that the lock will be held > open, just the length CF will wait before giving up when trying > to acquire the lock.
D'oh! When I tested this with session management enabled, it did in fact take 5 seconds to execute, so I was clearly wrong on this one. I don't know that I'd want to use this to pause execution, but it does work as Rick advertised. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

