Skip to main content
Participant
September 4, 2014
Answered

Coldfusion 10: execute as command line

  • September 4, 2014
  • 1 reply
  • 860 views

Using CF10 on a unix system.  Attempting to use cfexecute on perl and batch files do not work but they run fine when executed directly from command line.  The perl and bat file permissions are set so anyone can execute them.  Does anyone know if I make coldfusion execute the perl or bat file as if it was running as a command line?  May need to designate specific user the execute them as.

<cfexecute name="#EDRSDIR#/uploadconvertwrapper.pl" arguments="#filedirectory# #finalfilename# #dcnflag# #splflag# outputFile="/dev/null" timeOut="0" />

<cfexecute name="#EDRSDIR#/uploadconvert.bat" argumensts="#filedirectory# #finalfilename# #dcnflag# #splflag# outputFile="/dev/null" timeout="0" />

This topic has been closed for replies.
Correct answer charedrive

The "argumensts" was a typo just in my forum post.

I did finally find the answer.  The coldfusion was running under a different account than what I was using for command line testing.  Once I tried the commmand line with the coldfusion account, I found some hidden directories that required permission updates.  Thanks for the input, BKBK.

1 reply

BKBK
Community Expert
Community Expert
September 6, 2014

What about:

correcting the spelling of 'arguments';

dropping the .pl and .bat extensions;

giving the timeout a value greater than 0;

adding an error variable which you can output for debugging.

<cfexecute name="#EDRSDIR#/uploadconvertwrapper" arguments="#filedirectory# #finalfilename# #dcnflag# #splflag# errorVariable="errorOutput" timeout="10" />

<cfexecute name="#EDRSDIR#/uploadconvert" argumensts="#filedirectory# #finalfilename# #dcnflag# #splflag# errorVariable="errorOutput" timeout="10" />

charedriveAuthorCorrect answer
Participant
September 9, 2014

The "argumensts" was a typo just in my forum post.

I did finally find the answer.  The coldfusion was running under a different account than what I was using for command line testing.  Once I tried the commmand line with the coldfusion account, I found some hidden directories that required permission updates.  Thanks for the input, BKBK.

BKBK
Community Expert
Community Expert
September 10, 2014

Thanks for sharing that. Could you please mark it as the correct answer? It will help someone else.