PHP and shell_exec

前端 未结 6 1114
余生分开走
余生分开走 2021-01-22 14:06

I have a PHP website and I would like to execute a very long Python script in background (300 MB memory and 100 seconds). The process communication is done via database: when th

6条回答
  •  被撕碎了的回忆
    2021-01-22 14:58

    Thanks for your answers, but none of them worked :(. I decided to implement in a dirty way, using busy waiting, instead of triggering an event when a record is inserted.

    I wrote a backup process that runs forever and at each iteration checks if there is something new in database. When it finds a record, it executes the script and everything is fine. The idea is that I launch the backup process from the shell.

提交回复
热议问题