A webpage that fires off another Python script in the background, letting the user move on without stopping background task.
This was a little project that was based on my need to fire-off a process that was not bound to a web-user staying on the webpage. I thought it might be fun to use Python for this (instead of my 'native' PHP).
In short:
index.py
takesindex.html
as a template and sends it to the user- In this example, the user's POST, query-string, etc. goes to
main.py
which... - fires off
backgroundTask.py
- sends back to the user that all is well
backgroundTask.py
is the 'background task' which runs even after main.py is done sending the 'all is well' back to the browser- for my need, this background task runs for about 5 minutes (for example) but is not limited to this timeframe