I am creating a little dashboard for a user that will allow him to run specific jobs. I am using Django so I want him to be able to click a link to start the job and then return the page back to him with a message that the job is running. The results of the job will be emailed to him later.
I believe I am supposed to use subprocess.Popen but I'm not sure of that. So in pseudocode, here is what I want to do:
if job == 1:
run script in background: /path/to/script.py
return 'Job is running'