in reply to Launch background perl script from CGI
And also your generate_report.pl script should first generate/write the report to a temp file, and then rename/copy it to the cached final report at the end of processing. So while the report generation is still underway, users could still retrieve the most recently generated report.# check for semaphore file my $data_dir = "C:/data"; my $semaphore = "$data_dir/inprocess.txt"; die "another process is in progress" if -f $semaphore; # create the semaphore file open SEMAPHORE, ">$semaphore" or die "Can not create semaphore"; close SEMAPHORE; # do the processing... # delete the semaphore file at the end # you could put this bit in the END block. unlink $semaphore;
Please be patient while the report is being generated. This process may take more than 2 hours to complete. You can still refer to the most recent report <here> while the new report is being created.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (2) Launch background perl script from CGI
by Anonymous Monk on Dec 11, 2003 at 05:39 UTC | |
by Roger (Parson) on Dec 11, 2003 at 06:15 UTC | |
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 |