Home > Backend Development > PHP Tutorial > crontab 守护进程

crontab 守护进程

WBOY
Release: 2016-06-06 20:28:26
Original
1345 people have browsed it

需求是:
crontab 运行一个php 脚本

守护该脚本,

发现该进程被终止或者关闭则重启该进程.

如何实现?

回复内容:

需求是:
crontab 运行一个php 脚本

守护该脚本,

发现该进程被终止或者关闭则重启该进程.

如何实现?

ps -ef | grep test.php | grep -v 'grep' | wc -l 用while-true判断是否大于1,如果没有大于1.则拉起

daemontools.supervise

http://supervisord.org/

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template