Robert, To deal with that, I will de-activate the task item while it is running and then reactivate when the task is done.
Or maybe I put an is_running flag on the record such that my pseudo code is like this: * Query for tasks that are active, need to be executed (by date), and are NOT currently running. * Loop over tasks * For each: --- Update DB record for is_running = 1 --- Execute task --- Update DB record for is_running = 0 It might seem like an overhead, but once you get it working nicely, its quite nice. On Mon, Apr 6, 2009 at 3:58 PM, Robert Harrison <[email protected]>wrote: > > > For something like this, I generally have a scheduled task for a given > application that executes every 5 minutes (or whatever is appropriate). > > I may be able to do this. Sound feasible. > > Now here's the next thought. How can I tell if a program is already running > in an application? Its possible the program could be running already on > the > next scheduled run. If that's true, I don't want to start a second > occurrence. > > How can I tell if the program is already executing and ensure only one > occurrence of the program runs? > > I don't see anything on that in the documentation, although, I may not be > looking in the right place. I looked at CFTHREAD, but that does not look > like it deals with multiple invocations of the same program. > > Thanks > > Robert B. Harrison > Director of Interactive Services > Austin & Williams > 125 Kennedy Drive, Suite 100 > Hauppauge NY 11788 > P : 631.231.6600 Ext. 119 > F : 631.434.7022 > http://www.austin-williams.com > > Great advertising can't be either/or. It must be &. > > Plug in to our blog: A&W Unplugged > http://www.austin-williams.com/unplugged > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321364 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

