diff --git a/.agents/skills/ulthon-timer/SKILL.md b/.agents/skills/ulthon-timer/SKILL.md index a864090..8c4d242 100644 --- a/.agents/skills/ulthon-timer/SKILL.md +++ b/.agents/skills/ulthon-timer/SKILL.md @@ -187,6 +187,20 @@ return [ - 只跑一轮(便于验证):`php think timer --temp` - 无任务时不输出“no request”:`php think timer --quiet` +### Docker 模式(自动启动) + +使用框架内置的 Docker 部署模式(`docker compose up` / `docker run ... server`)时,定时器会**自动启动**,无需手动运行 `php think timer`。 + +容器启动脚本(`source/stack//source/docker/run.sh`)在 server 模式下会执行: + +```bash +nohup php /var/www/html/think timer --local --quiet & +``` + +即 timer 进程与 web 服务(nginx + php-fpm)在同一容器内并行运行,`--quiet` 抑制 "no request" 输出。 + +多节点部署:每个容器各自启动 timer 进程,`runtime/node_id.lock` 在各自容器内独立生成(天然隔离),连同一个数据库即自动组成多节点集群。 + ### 本地调试(指定请求 Host) site 任务会按站点域名发起请求,默认从 `sysconfig('site','site_domain')` 读取。