in reply to Passing "actions" to server for processing to prevent timeout

merlyn wrote a good column about launching long-running processes from CGI here.

Another method (which I use in a few places) is to write a daemon that monitors a database table for new jobs to execute. The CGI script places a new job in the table, and the daemon executes it and updates the table with its status. The CGI can then periodically reload itself and display the status. (Or you can do really fancy stuff with AJAX progress bars and the like.)

  • Comment on Re: Passing "actions" to server for processing to prevent timeout