For stuff like this I set up a scheduler. The jobs that need to be done are recorded in a table. A separate application scans the table looking for jobs to do. When it sees one, it marks it as 'in process' and starts working on it. When it's done, it marks the job done. Multiple instances of the separate application can be run simultaneously so that the jobs get run concurrently. The front end the user sees shows the user the status of the jobs so that they know what's being worked on, what's done, etc.
↧