in reply to Re: (2) Launch background perl script from CGI
in thread Launch background perl script from CGI
Where the back quotes `` tell perl to run the generate_report.pl script, and the '&' at the end puts the script in background. Your CGI script will return control immediately to the browser, leaving the report generation script to run in the background (without interfering with the browser).# check if the 'Generate Report' button is clicked # if so, then set $generate_report to true. if ($generate_report) { # kick off background processing `C:\\Perl\\bin\\perl.exe generate_report.pl &`; # print some feedback text back to user print $cgi->header, $cgi->start_html, "The generate_report.pl script has started in background", $cgi->end_html; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (4) Launch background perl script from CGI
by Anonymous Monk on Dec 11, 2003 at 06:30 UTC | |
by edan (Curate) on Dec 11, 2003 at 07:08 UTC | |
by Roger (Parson) on Dec 11, 2003 at 06:50 UTC |