Keep process running after logout

I am developing a count system that will have some fairly lengthy counts. The user may want to start a count running (mysql) and log out and go to lunch while it runs. Question: Can I actually DO that? How do I not stop the process when the user logs out?

I am guessing here, but you can write the code to run with no output to screen and then execute it with a PHP shell_exec() from a Control application. The executing code will the change the status of a flag in the DB to indicate progress for the user to query later when he returns.

I’ll play with this idea. Thanks for the suggestion.