git clone https://github.com/kcloze/swoole-jobs.git cd swoole-jobs composer install
php ./bin/swoole-jobs.php start
1.修改配置config.php 2.启动服务 php ./bin/swoole-jobs.php start >> log/system.log 2>&1 3.往队列推送任务 php ./tests/testJobsSerialzie.php 4.启动api服务 php ./bin/swoole-jobs.php http start 5.停止api服务 php ./bin/swoole-jobs.php http stop
NAME - manage swoole-jobs SYNOPSIS -php ./bin/swoole-jobs.php app [options] -Manage swoole-jobs daemons. WORKFLOWS -help [command] -Show this help, or workflow help for command. -restart -Stop, then start swoole-jobs master and workers. -start -Start swoole-jobs master and workers. -stop -Wait all running workers smooth exit, please check swoole-jobs status for a while. -exit -Kill all running workers and master PIDs. -http start -Start swoole http server for apis. -http stop -Stop swoole http server for api.
* * * * * /usr/local/bin/php /***/swoole-jobs.php start >> /***/log/system.log 2>&1
更多systemd介绍
1. 根据自己项目路径,修改 docs/systemd/swoole-jobs.service 2. sudo cp -f systemd/swoole-jobs.service /etc/systemd/system/ 3. sudo systemctl --system daemon-reload 4. 服务管理 #启动服务 sudo systemctl start swoole-jobs.service #reload服务 sudo systemctl reload swoole-jobs.service #关闭服务 sudo systemctl stop swoole-jobs.service
example/bin
qq群:141059677