I've run out of things to try in solving this one -- Any help would be
appreciated!
I'd like to write the output of a query to a text file on our Solaris Web
server, using CFFILE, from a CFSCHEDULE process. I used "chmod a+rw
outputfilename.txt" to ensure that CFFILE had write permission on the file.
I also used "chmod a+rwx mydirectory" on the file's parent directory to
ensure that CFFILE could access the contents. Also, the CFFILE tag is
allowed under "Basic Security".
Unfortunately, the script only runs when I load the file from a browser (no
error messages), and not when the CFSCHEDULE job runs. I've checked
SCHEDULER.LOG to confirm that the job is executing (which it is), however,
the output file is blank every time. So, apparently the server process has
permissions to erase the contents of the file, replacing it with blank
lines, but the query output is never written to the file ... ?
I've thought about adding cftry/cfcatch to intercept any write errors;
however, this would involve writing the error message to a file - which is
my problem in the first place - and it always executes properly when I load
the page manually ...
The code is below, as you can see it's pretty straightforward. Any ideas on
this one?
Thanks, Kevin
<cfquery name="GetRUFGCount" datasource="pqisII_native">
select count(*) as Qty from v_MTUnithistory
where v_mtunithistory.alref = 52
and entered > trunc(sysdate)
</cfquery>
<cfoutput query="GetRUFGCount">
<cffile Action="Write"
File="/oramnt/app1/coldfusion/doc/manufacturing/data/pqis/standalone/readerb
oard/remoteunit/outputfilename.txt"
Output="#Qty# RU boxes today so far.
#DateFormat(Now())# #TimeFormat(Now())#">
</cfoutput>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.