Hi,
I am using the HTTP Get file in a nonortodox way :)
I'm using it to send shutdown request to a remote proccess that listens to HTTP requests. The command is
http://%MACHINE1%/responder?shutdown?
The thing is the action is stuck until the remote proccess actualy closes, which can take up to 10 minutes and I would like to set a timeout to the HTTP Get file action so after that time it simply finishes and moves on. I there a way to do that?
(I'll totally understand if you tell me that I'm not using it for it's intented purpose so you can't help me)
Thanks,
NirS
wow... that's thinking outside the box :)
Unfortunately that action doesn't have any way to set a timeout, and the library we are using to do the http get also doesn't have a way to specify a timeout...
If you really want to do it this way (rather than, say, using the WMI Shutdown action), I’d download the Win32 port of GNU WGet and then call it from an Execute Program Action with “Wait For Completion” unchecked.
This means that FinalBuilder will spawn the wget command (which will load the web page) but will not wait around for it to finish. The downside is that if an error occurs, you won’t be informed about it.
(The other way, of course, would be to make the web server responder script asynchronous - so it spawns an autonomous subprocess to deal with the shutdown request and completes the Get instantaneously.)
Hth.
Thanks Tate and Angus
The reason I’m using HTTP Get File instead of WMI Shutdown or PSKill is that I want to close the proccess nicely (also it is taking so long because it’s doing some writing to the disk). I am using it the way that after it closes (or throws an error) I’m runnig wait for proccess and if it’s still there I simply kill it.
I’ll check the WGet utility too.
If you have any other idea how to send HTTP requests with FB (without using get file actions), I’ll be happy to hear.
Thanks again,
NirS