Is it wise to use PHP for a daemon?

前端 未结 17 1421
庸人自扰
庸人自扰 2020-11-28 09:18

I wish to create a background process and I have been told these are usually written in C or something of that sort. I have recently found out PHP can be used to create a da

17条回答
  •  执念已碎
    2020-11-28 09:51

    You might want to consider making a mysql trigger that executes a system command (i.e. FFmpeg) instead of a daemon. If some lag isn't a problem, you could also put something in cron that executes every few minutes to check. Cron would be my choice, if it is an option.

    To answer your question, php is perfectly fine to run as a daemon. It does not have to be done in C.

提交回复
热议问题