its on a linux server and has been registered with the host too run the task
needs to run ever 15 minutes
code
this is on the page the task is set too run on
<!--- run every 15 minutes --->
<cfschedule
Task="River Flow Updates"
ACTION=""> OPERATION="httprequest"
URL=""> INTERVAL="900"
STARTDATE="08/11/2004"
>
the scheduled page
actually needs to loop through recordset
(simple version)
<!--- get all rivers --->
<cfquery name="qGetRivers" datasource="#dsn#" username="#un#" password="#pw#">
SELECT * FROM flows
</cfquery>
<!--- retrieve info from USGS website --->
<cfhttp url=""> method="get">
</cfhttp>
<!--- place contents into a formated variable --->
<cfset data = "">
<!--- set retrieved variables--->
<cfset setDate = DateFormat(dateTime, "mmm-dd-yyyy")>
<cfset setTime = TimeFormat(dateTime, 'hh:mm:ss tt')>
<cfset last = listLast(data, "USGS")>
<cfset riverNumber = listGetAt(last, 1, chr(9))>
<cfset dateTime = listGetAt(last, 2, chr(9))>
<cfset waterFlow = listGetAt(last, 3, chr(9))>
<!--- check too see if this river has temp available --->
<cfif #qGetRivers.riverType# EQ 2>
<cfset waterTemp = listGetAt(last, 4, chr(9))>
<cfelse>
<cfset waterTemp = "N/A">
</cfif>
<!--- insert the contents of the form into the db --->
<cfquery name="addflows" datasource="#dsn#" username="#un#" password="#pw#">
UPDATE flows
SET riverNumber = '#riverNumber#'
, enteredDate = '#setDate#'
, enteredTime = '#setTime#'
, waterFlow = '#waterFlow#'
, waterTemp = '#waterTemp#'
WHERE riverID = '#qgetRecords.riverID#'
</cfquery>
any thoughts
tia
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

