1

I need to run a exe file on app server using coldfusion schedule task. I wrote code inside cfm file with cfexecute command below. But the executable doesn't run with/without timeout clause in cfexecute. Can anyone point out what I'm doing wrong.

<cfsetting enableCFOutputOnly="false" requestTimeout="9600" />
<!--- Call executable --->
<cftry>
 **<cfexecute name= "C:\npp.exe" />**      
   <cfcatch type="Any">
    <cfoutput>(Cal): Error - #cfcatch.message#</cfoutput>
    <!--- TO DO:Log error --->
    <cflog application="true" log="application" type="Error" 
        text=" Error - #cfcatch.message#" />
    </cfcatch> 
 </cftry>
  <cflog application="true" log="application" type="Information" text=" executable called" />
James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Aman
  • 15
  • 2
  • 5
  • 2
    Not without more information. What is the *exact* cfexecute command? What do you mean by "the executable doesn't run"? Are you using the available variables ie [variable (output) and errorVariable (error message)](https://wikidocs.adobe.com/wiki/display/coldfusionen/cfexecute) ? Does the account the CF service is running under have permissions for this executable/task? – Leigh Jun 10 '15 at 11:56
  • What is the timeout set in CF Admin. If the task takes more than the one, set in Admin, then it will timeout. You need to set a timeout greater than the actual time taken, and you can get rid of requestTimeout in the code. – Anit Kumar Jun 10 '15 at 13:36

0 Answers0