Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CF MX 7: Launch .CFM Page from a Batch File

Status
Not open for further replies.

firepwr

IS-IT--Management
May 22, 2006
31
US
In Coldfusion 6 I used to be able to launch a .cfm file from a batch file (runme.bat) in the following way:

Code:
set cf_template_path=c:\inetpub\schedule\runme.cfm
set QUERY_STRING=RequestTimeout=6000
c:\cfusion\bin\cfml.exe

In Coldfusion MX 7 this obviously won't work since there is no "cfml.exe" file. Does anyone know how to do this in the newer version?

And I know about the Coldfusion Scheduler...I just can't use it for this particular application....

Thanks.

Paul.
 
Heh...heh...that thread IS on the same subject but they don't have an answer either.... [sad]
 
Well i supose you could always launch the URL in a browser from a batch file, using

Code:
start [URL unfurl="true"]http://192.168.1.1/schedule/runme.cfm[/URL]

Obviously replace your IP to the local machine holding the cfm file, then this comman will open it in the default browser.

Now, this a very similar effect to using schedule, as it pushes an HTTP request to the page.

I'm guessing you cant use schedule as this request is actioned on a particular event that occurs on the server or in another application.

Anyway, play aroud with that solution, its a temporary fix if nothing more.

Thanks,

Rob
 
Well i supose you could always launch the URL in a browser from a batch file, using

One thing to be aware of launching a URL directly from the command line is that it would open a new browser window for each time the scheduler runs. Unless you have something in the page itself that closes the browser or the schedule only runs every now and again, you will very quickly end up with an unstable server because it has so many browser windows open.

Hope this helps

Wullie

YetiHost - Quality Coldfusion 7/Windows Hosting

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Yes thats a completely valid point Wullie,

I'd like to know a little more about your requirements on this one firepwr, as there may be another solution we can look at if we know what is actioning this .bat file, is there no other way to have the other application post an HTTP request to the .cfm file without having to open any bat file atall?

Thanks,

Rob
 
Well one of the main issues that we see repeatedly is that the CF scheduler is unreliable. Stuff just seems to randomly fail to execute for no apparent reason....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top