Copy link to clipboard
Copied
I have the following saved page setup as a "Scheduled Task" in CF9.
- Occasional the connection fails and the "AC_ACCT.csv" file-size is saved as a 0k file
- How would I alter this page to do a check on that csv file, and rerun the page until it is no longer 0k?
In summary, run the page, check the saved csv file, if >0k then end, if =0k then rerun the page again.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MBS Web Service Call</title>
</head>
<!--- Create a variable for the URL --->
<cfset theURL = "https://domain.com.php">
<!--- Make the Post Request --->
<cfhttp
method="post"
url="#theURL#"
port="443"
throwonerror="True"
resolveurl="yes"
delimiter=","
textqualifier=""
path="C:\MBS"
file="AC_ACCT.csv">
<cfhttpparam type="formfield" name="webServiceKey" value="xxxxxxxxxxxxxx">
<cfhttpparam type="formfield" name="companyId" value="101">
<cfhttpparam type="formfield" name="queryTableName" value="AC_ACCT">
</cfhttp>
<!--- Dump the Data to File --->
<body>
</body>
</html>
Have something to add?