How do you Auto submit a form as ajob on a server?

Ok this is tough!

I have a client that I need to post data to via http post:
All i can get is connection failures because of the https and I have exhausted the work arounds on that.
So I made the code a form with auto submit but can't get the form to fire as a server job in cfadmin jobs.

Any ideas???

See code below:
Original code: 
Connection failure Every time: 
cfhttp url="https://URL.aspx" method="post"> 
<cfhttpparam type="FORMFIELD" name="Name" value="Stephanie  Slimfield">
<cfhttpparam type="FORMFIELD" name="Address" value="101 Main st">
<cfhttpparam type="FORMFIELD" name="City" value="Florence">
<cfhttpparam type="FORMFIELD" name="State" value="AL">
<cfhttpparam type="FORMFIELD" name="Zip" value="35641">
<cfhttpparam type="FORMFIELD" name="OfficePhone" value="2561258589">
<cfhttpparam type="FORMFIELD" name="Email" value="">
<cfhttpparam type="FORMFIELD" name="Company" value="compname">
<br />
New Code with auto submit  (Works great when I open in my browser won't work as a scheduled job)
<cfform action="https://URL.aspx" method="post" name="form1" target="_self">
<input name="Name" type="hidden" value="Stephanie Slimfield" />
<input name="Address" type="hidden" value="115 sMain st" />
<input name="City" type="hidden" value="Killen" />
<input name="State" type="hidden" value="AL" />
<input name="Zip" type="hidden" value="35412" />
<input name="OfficePhone" type="hidden" value="2568568547" />
<input name="Email" type="hidden" value="" />
<input name="Company" type="hidden" value="A to Z Insurance" />

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

erikTsomikSystem Architect, CF programmer Commented:
make sure that the job is scheduled
LeadCoAuthor Commented:
Yes it is scheduled.
why cant you create a schedular usign cfschedule

Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

LeadCoAuthor Commented:
In cfadmin I can click a check box Publish Save output to file on a scheduled job, is that what you mean?
see you can create schedular with code no need of cfadmin with cfschedule tag  .

The only limitation it has is it should be in same domain.

in you case i don't think ur dng cross domain stuff

LeadCoAuthor Commented:
I am submiting to an external URL, thats cross domain isn't it?
ur submitting to external but the called page in schedular is in ur local domain it self isn't it?

Try cfschedule  and see it should work
cfschedule and scheduled tasks use the same <cfhttp> call behind the scenes to request your page. and cfhttp does not execute javascript...

go back to you original <cfhttp> call, and try adding redirect="yes" and resolveurl="yes" to the tag, and maybe a valid useragent attribute as well...


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Yup azadi i completely agree with you
Ok see this URL which will give you steps to debugging .
I think ur using SSL right , so enable the SSL debugging options for the JVM and just look at the SSL handshake details.
I haven't tried this myself, but I'm thinking that since CFSCHEDULE uses CFHTTP under the covers, that it should be possible to do if you follow the procedure for enabling SSL for CFHTTP
Please see this URL it will help you i think so 
redirect="yes" and resolveurl="yes" ,  those two will not solve the issue  , these two come in to act after the intial handshake is done ,I am very sure the problem is LeadCo is calling https://  from cfhhtp  because he is getting connection failure error.
So the steps i gave may help in that .
LeadCoAuthor Commented:
Can't seem to get a different result even with redirect and reolveURL.

Still Get Connection Failure even after importing there cert in my kestore.

LeadCoAuthor Commented:
They are puzzled others are posting fine.
They don't even show me hitting the page from my IP.
try using fiddler on IE, or FireBug/httpFox/Tamper Data on FF to check the actual http headers and request/response sent to and received back from the url you are submitting to when you do cfhttp call and when you do direct form post, then compare them to see where they differ.

if you see some headers when you do straight form post which you do not see in your cfhttp call, add those to <cfhttp> and see if it works.

it's impossible to give you a detailed direct answer without testing it out, for which we'll need the url you are submitting to.

LeadCoAuthor Commented:
Ok we did the Dump and found that when the SSL is checked my connection drops it, my server admin can't figure why. Any Suggestions???

          O=VeriSign, Inc.
          OU=VeriSign Trust Network
          OU=Terms of use at https:

          rpa (c)05
          CN=VeriSign Class 3 Secure Server CA
        Serial         xxxxxxxxxxxxxx
          Extension: X509v3 Basic Constraints
          Extension: X509v3 Key Usage
          Extension: X509v3 CRL Distribution Points
          Extension: X509v3 Certificate Policies
          Extension: X509v3 Extended Key Usage
          Extension: X509v3 Authority Key Identifier
          Extension: Authority Information Access
2 4  0.0491 (0.0000)  S>CV3.1(4)  Handshake
2 5  0.0991 (0.0500)  C>SV3.1(2)  Alert
    level           fatal
    value           certificate_unknown
LeadCoAuthor Commented:
Ok for future reference do all above then restart ColdFusion......  I think importing the cert and restarting coldfusion was the ticket..  Thanks for all who contributed. Points for all.
LeadCoAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.