I had a bit of a play... Your page could re-schedule itself at a specified time, ie: 5 seconds after it finished - so it runs constantly or as often as you like.
It's quite do-able. Working example attached.
Cheers.
<!--- Important/frequent processing goes here --->
<!--- Rescheduling parameters --->
<cfset intPauseSeconds = 5>
<cfset intTimeout = 600>
<cfset dtRerun = dateadd('s',intPauseSeconds,Now())>
<cfset rerunDate = dateformat(now(),'MM/DD/YY')>
<cfset rerunTime = timeformat(dtRerun,'h:MM:SS tt')>
<cfset taskName = "MySemiContinuousTask">
<!--- Reschedule for later --->
<cfschedule action="update" task="#taskName#" operation="HTTPRequest"
url = "http://#cgi.HTTP_HOST##cgi.SCRIPT_NAME#"
startDate = "#rerunDate#" startTime = "#rerunTime#"
interval = "once" requestTimeOut = "#intTimeout#">
<!--- All done --->
<cfset message = "Task fininshed and scheduled to start again at #rerunDate#
#rerunTime#">
<cflog file="#taskName#" text="#message#" type="information">
<cfoutput>#message#</cfoutput><br />
On Dec 6, 2007 6:27 PM, nkosi <[EMAIL PROTECTED]> wrote:
>
> Why do you need a schedule to run so regularly? Is the schedule
> process intensive? If something is changing or updating so often
> couldn't you set up a trigger on the object that is changing?
> Personally I would think about using a gateway - monitor the object
> and whenever it changes fire an event. That way your processing only
> happens when it needs to.
>
> Thoughts?
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---
continuous-schedule.cfm
Description: application/cfm
