使用 systemd 管理此进程
---- 8< ---- /lib/systemd/system/gearman-worker.service
[Unit]
Description=我的 Gearman 工作者
[Service]
ExecStart=/usr/bin/php /var/www/my-worker.php
Restart=always
[Install]
WantedBy=multi-user.target
---- >8 ---- /lib/systemd/system/gearman-worker.service
systemctl daemon-reload
systemctl enable gearman-worker
systemctl start gearman-worker