Forum Moderators: coopster & phranque

Message Too Old, No Replies

Triggering scripts remotely

Browser timeout issues

         

sugarkane

8:35 am on May 29, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a script that typically takes 5-10 minutes to run. It's usually run off a cron, but in certain circumstances I'd like to be able to trigger it remotely.

I've been doing this by wrapping it in a CGI and calling it from a browser, though this results in a browser timeout most of the time. The timeout doesn't actually matter, as the script will happily continue running whether the browser is waiting for a response or not, but it's an annoyance.

So, is there any way to call a CGI that triggers a script and then returns a page to the browser without waiting for the script to complete? Forking maybe? NPH?

Any ides appreciated.

Nick_W

10:37 am on May 29, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Would it be possible for the cgi (if I understand this correctly) to return a value based on successfuly passing the command to execute the script?

rather like mail() in php, it returns true on successfully passing the commands to sendmail not successfully sending the email?

just a thought....