Use CFEXECUTE to call a .bat file and even pass params:

Thank Simon Horwith for this one.  In this case, if testing.cfm stated <cfoutput> 
#url.testing# </cfoutput> and I called the batch file like so: "test.bat hello", CF 
would output hello.  Of course, when it comes to command line calling of cfml.exe, you 
don't generally try to generate output like this, you create files and manipulate data.

<!--- This is an example .bat file --->

SET QUERY_STRING=%1
SET CF_TEMPLATE_PATH=\\uncPath\D$\Inetpub\wwwroot\testing\cfml.exe\testing.cfm
E:\CFUSION\BIN\CFML.EXE

<!--- End .bat file --->

-----Original Message-----
From: Frank Mamone [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 4:12 PM
To: CF-Talk
Subject: Re: CFMX from the command line


Download Wget.  It's a command line http client.

You can find a Win32 version by searching in google with wget +Win32.
 I use it to run tasks from NT scheduler. You can use a bat file and put in
your cfm page:

wget http://whatever/whatever.cfm?key=value

Thanks to Dave Watts for this one.

Frank Mamone


----- Original Message -----
From: "Brook Davies" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, August 21, 2002 2:45 PM
Subject: CFMX from the command line


> Does anyone know how to call a CF page from the command line with MX?
>
> I want to take advantage of the Win2k Alert service which can monitor
> basically any process on the server. I want to set up various alerts &
> monitors for things like the CF Queued requests starting to pile up (a
sure
> sign of a problem) and CPU/Memory Usage etc. The Alert Service allows you
> to specify an executable to run when this happens and pass command line
> arguments. I would like to be able to pass error codes and such to a CF
> template which handles logging (I love the new logging functionality in
MX)
> and email/SMS alerts to various system administrators based on the
severity
> of the alerts.
>
> Brook Davies
> maracasmedia inc.
>
>
> 

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to