关于自部署版本的定时任务 #14300
Replies: 3 comments 11 replies
-
|
Hi @Woisol! I'm Dosu and I’m helping the lobehub team. 定时任务功能在自部署版本中是支持的,但需要额外的基础设施配置才能正常运行 [1]。 核心要求:部署 cron-dispatcher sidecar 自部署版本需要一个单独的 需要配置的环境变量 [1]:
注意事项:
To reply, just mention @dosu. Docs are dead. Just use Dosu. |
Beta Was this translation helpful? Give feedback.
-
|
I think this will works. make sure you have NOT set the env then add this to your docker compose file. cron-dispatcher:
image: alpine/curl:latest
container_name: lobe-cron-dispatcher
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
- CRON_SCHEDULE=0,30 * * * *
- TARGET_URL=http://lobe:${LOBE_PORT:-3210}/api/workflows/task/schedule-dispatch
- DRY_RUN=false
entrypoint: sh -c
command:
- >
echo "$$CRON_SCHEDULE curl -fsSL -X POST -H 'Content-Type: application/json' -d \"{\\\"dryRun\\\":$$DRY_RUN}\" $$TARGET_URL" > /var/spool/cron/crontabs/root &&
crond -f -L /dev/stdout
networks:
- lobe-network |
Beta Was this translation helpful? Give feedback.
-
|
我发现一个模拟 qstash的服务项目 可以进行本地部署使用 downstash |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
我已经成功部署了 v2 版本的 LobeHub,但是官方文档 https://lobehub.com/zh/docs/usage/agent/scheduled-task 提到的定时任务在自部署版本中并不存在,请问如何解决?
Beta Was this translation helpful? Give feedback.
All reactions