简体   繁体   中英

How to fork a python script in the background from cgi script

I am making a website for a sports team. there is a python 3.3 cgi script that allows a user to input match data. I would like to send an email to everyone on the mailing list to tell them that there has been a new match submitted, but I obviously don't want the person inputting the data to be waiting for ages while all the emails are sent. How can I start a python script in the background that will do this. I also need it to queue any match submits after while this is still processing. thanks for any help in advance.

Never run application from cgi scripts, It's very insecure. Use any DB and cron for this. Store data from your cgi script to DB and run from cron mail script that will sending all emails.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM