Start background process/daemon from CGI script

后端 未结 10 1154
北恋
北恋 2020-12-10 02:02

I\'m trying to launch a background process from a CGI scripts. Basically, when a form is submitted the CGI script will indicate to the user that his or her request is being

10条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-10 02:44

    For thous that have "sh: 1: Syntax error: redirection unexpected" with the at/batch solution try using something like this:

    Make sure that the at command is installed and the user running the application ins't in /etc/at.deny

    os.system("echo sudo /srv/scripts/myapp.py | /usr/bin/at now")
    

提交回复
热议问题