in reply to Managing a long running server side process using CGI

When I've done this, I just have the CGI interface gather parameters from the user and then set a flag of some sort (presence of a file, a database value, etc) indicating that the process is ready to go.

The main program is kicked off by cron (or task scheduler in Win32) and checks for whatever the flag is and runs with the supplied params if the flag is found. The main program logs its progress so the user can follow what's happening - presumably via another CGI interface.

If there's a requirement that parameters can change, just have the main program reread it's param whenever it finds they've changed.

  • Comment on Re: Managing a long running server side process using CGI