Re: Schedule task more frequent than 1 inute

2010-12-06 Thread Stefan Richter

Thanks for all the replies. 

Some background info. My app converts Office documents and each conversion may 
run for a few minutes which is why I did not want to run this 'inline' but 
break the upload away from the conversion. 
For this reason I have a scheduled task that checks the database for new 
uploads and then converts them. 99% of the time there will not be a new file, 
but when there is then I'd like to minimise the time between upload and 
conversion start.

I considered threads but heard that there is a limit on CF Standard - potential 
headache if things get busy. 

Schedule the same task as many times per minute you need, starting at 
different times.
I thought that too but what happens on server restart? Do all tasks re-init 
themselves at the same time? 

In the end I think once a minute is ok, but I will also ping now the page that 
handles the conversion shortly after the upload is complete. 

Out of interest: am I correct in thinking that if one task is running a 
conversion and the scheduled task fires again then this second process will not 
have to wait for the first conversion process to complete? So in essence I can 
achieve a level of multithreading in this way?

Regards,

Stefan






~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339805
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-06 Thread Dave Watts

 Out of interest: am I correct in thinking that if one task is running a 
 conversion and the scheduled task fires again then this second process will
 not have to wait for the first conversion process to complete? So in essence 
 I can achieve a level of multithreading in this way?

This is generally true for CF processes. However, it may not be true
for things like converting documents - those things rely on
functionality outside of CF that may well be single-threaded.
Honestly, I don't know enough about how document conversion is handled
in CF to answer that definitively, but if there are any problems
you'll see them in testing.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339808
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-06 Thread Steven Durette

This sounds like you need a directory watcher gateway.  I know it is available 
with CF8 Enterprise but I don't know about other versions.

Sent from my iPhone

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339809
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-06 Thread Rick Root

On Mon, Dec 6, 2010 at 8:44 AM, Steven Durette st...@durette.org wrote:


 This sounds like you need a directory watcher gateway.  I know it is
 available with CF8 Enterprise but I don't know about other versions.


IEvent Gateway's are not restricted to CF Enterprise anymore, they're part
of the standard feature set - don't know when they did that, but they are
available in CF8 Standard.

DirectoryWatcher is a specific type of gateway... the Simple Interval
Gateway is a custom gateway written in java that you put on the server, then
in the admin console go to Gateway T ypes and add it, THEN go to Gateway
Instances and add the specific instance of the gateway for your purpose.

Rick


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339810
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-04 Thread Rick Root

On Fri, Dec 3, 2010 at 8:22 AM, Stefan Richter ste...@flashcomguru.com wrote:

 Is there any way to schedule a task in CFadmin more frequently than once a 
 minute? I need to run it 2-3 times  minute if possible.

I have the perfect solution for you.

http://www.opensourcecf.com/simplegateway/

I wrote a very simple interval gateway for this exact reason.

Ric

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339774
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Schedule task more frequent than 1 inute

2010-12-03 Thread Stefan Richter

Is there any way to schedule a task in CFadmin more frequently than once a 
minute? I need to run it 2-3 times  minute if possible.

Regards,

Stefan





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339728
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Schedule task more frequent than 1 inute

2010-12-03 Thread Andrew Scott

I am not sure why you want to run something this frequently, but what I can
say is if you do then the question I would be asking is what you are trying
to run this frequent?


Regards,
Andrew Scott
http://www.andyscott.id.au/

 -Original Message-
 From: Stefan Richter [mailto:ste...@flashcomguru.com]
 Sent: Saturday, 4 December 2010 12:23 AM
 To: cf-talk
 Subject: Schedule task more frequent than 1 inute
 
 
 Is there any way to schedule a task in CFadmin more frequently than once a
 minute? I need to run it 2-3 times  minute if possible.
 
 Regards,
 
 Stefan
 


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339729
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-03 Thread Dominic Watson

It's not possible AFAIK. Depending on your task, an EventGateway might be
what you're after - if not, then I think you'll need a scheduling solution
outside of CF.

Someone may correct me, of course ;)

Dominic

On 3 December 2010 13:22, Stefan Richter ste...@flashcomguru.com wrote:


 Is there any way to schedule a task in CFadmin more frequently than once a
 minute? I need to run it 2-3 times  minute if possible.

 Regards,

 Stefan





 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339730
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-03 Thread Gerald Guido

There are several ways. Not in ACF that I am aware of. Off the top of my
head You can set up a scheduled task in Windows and point it @ wget.

Or in *nix you can use run a cron job or use something like Portable cron on
windows.

http://wiki.uniformserver.com/index.php/Portable_Cron

HTH

G!

On Fri, Dec 3, 2010 at 8:22 AM, Stefan Richter ste...@flashcomguru.comwrote:


 Is there any way to schedule a task in CFadmin more frequently than once a
 minute? I need to run it 2-3 times  minute if possible.

 Regards,

 Stefan





 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339731
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-03 Thread Claude Schnéegans

 Is there any way to schedule a task in CFadmin more frequently than once a 
 minute?

Schedule the same task as many times per minute you need, starting at different 
times.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339732
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-03 Thread Michael Grant

Excellent point, you beat me to it.
We have a couple of apps that needed really close occurring tasks (pre event
gateways) and this is how we handled it.



On Fri, Dec 3, 2010 at 10:01 AM,  wrote:


  Is there any way to schedule a task in CFadmin more frequently than once
 a minute?

 Schedule the same task as many times per minute you need, starting at
 different times.

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339733
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Schedule task more frequent than 1 inute

2010-12-03 Thread Robert Harrison

Are these tasks running all the time like that? I think I'd write a never 
ending program to run in the background if they are. 

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: AW Unplugged
http://www.austin-williams.com/unplugged




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339734
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-03 Thread Gerald Guido

 Schedule the same task as many times per minute you need, starting at
different times.

Out of curiosity. Do the tasks fire off one exactly one minute after they
are submitted or at every minute xx:xx:00?

I am assuming they do.

Thanx
G!


On Fri, Dec 3, 2010 at 10:01 AM,  wrote:


  Is there any way to schedule a task in CFadmin more frequently than once
 a minute?

 Schedule the same task as many times per minute you need, starting at
 different times.

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339736
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-03 Thread Michael Dawson

I would create a page that is scheduled to run every minute.

That page would call an external request via CFHTTP, CFTHREAD or whatever could 
spawn a new CF request.  Then, it would sleep for however long (20-30 seconds, 
for example) then call itself once or twice more.

Then, in the next minute, that page is requested once again and the process 
repeats.

mike 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339740
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Schedule task more frequent than 1 inute

2010-12-03 Thread Robert Harrison

 Then, it would sleep for however long (20-30 seconds, for example)

How do you make a program sleep?


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: AW Unplugged
http://www.austin-williams.com/unplugged




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339750
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-03 Thread Michael Grant

cfset status = ZzZzZzz /

On Fri, Dec 3, 2010 at 12:07 PM, Robert Harrison rob...@austin-williams.com
 wrote:


  Then, it would sleep for however long (20-30 seconds, for example)

 How do you make a program sleep?


 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: AW Unplugged
 http://www.austin-williams.com/unplugged




 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339752
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Schedule task more frequent than 1 inute

2010-12-03 Thread Robert Harrison

cfset status = ZzZzZzz /

I should have seen that coming :-)





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: AW Unplugged
http://www.austin-williams.com/unplugged




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339754
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-03 Thread Matt Quackenbush

sleep()

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-6f29.html


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339755
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Schedule task more frequent than 1 inute

2010-12-03 Thread Dave Watts

 Is there any way to schedule a task in CFadmin more frequently than once a 
 minute? I need to run it 2-3 times  minute if possible.

Some people have already mentioned you can use threads and sleep, etc.
However, I'd recommend that you take the task out of CF entirely, if
possible, and implement it using your OS task scheduler. You'll
generally get better performance that way, with less impact on the
regular web serving tasks of your web application.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339765
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm