• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Rerun the page if saved "file-size" = zero

Contributor ,
Aug 20, 2015 Aug 20, 2015

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.

2015-08-20_1501.png

<!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>

Views

150

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation