-
Notifications
You must be signed in to change notification settings - Fork 61
Description
ERROR: Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 694, in lifespan
async with self.lifespan_context(app) as maybe_state:
File "/usr/local/lib/python3.11/contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "/app/server.py", line 871, in lifespan
scheduler = build_scheduler()
^^^^^^^^^^^^^^^^^
File "/app/server.py", line 665, in build_scheduler
sched.register(agent_instance, schedule=cfg.schedule, execution_mode=cfg.execution_mode or "batch")
File "/app/src/core/scheduler.py", line 48, in register
trigger = self._parse_cron(schedule)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/src/core/scheduler.py", line 67, in _parse_cron
return CronTrigger(
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/apscheduler/triggers/cron/init.py", line 119, in init
field = field_class(field_name, exprs, is_default)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/apscheduler/triggers/cron/fields.py", line 65, in init
self.compile_expressions(exprs)
File "/usr/local/lib/python3.11/site-packages/apscheduler/triggers/cron/fields.py", line 90, in compile_expressions
self.compile_expression(expr)
File "/usr/local/lib/python3.11/site-packages/apscheduler/triggers/cron/fields.py", line 101, in compile_expression
raise ValueError(
ValueError: Error validating expression '*/60': the step value (60) is higher than the total range of the expression (59)
使用sqlite查看数据库
sqlite> SELECT * FROM agent_configs;
1|daily_report|盘后日报|每日收盘后生成自选股日报,包含大盘概览、个股分析和明日关注|1|0 15 * * 1-5|batch|1|[1]|{}|2026-02-03 07:39:50|2026-02-04 01:17:25
2|intraday_monitor|盘中监测|交易时段实时监控,AI 智能判断是否有值得关注的信号|1|*/60 * * * |single|1|[1]|{"price_alert_threshold": 3.0, "volume_alert_ratio": 2.0, "stop_loss_warning": -5.0, "take_profit_warning": 10.0, "throttle_minutes": 30}|2026-02-03 07:39:50|2026-02-04 06:27:01
3|news_digest|新闻速递|定时抓取与持仓相关的新闻资讯并推送摘要|1|50 8 * * 1-5|batch|1|[1]|{"since_hours": 12, "fallback_since_hours": 24}|2026-02-03 07:39:50|2026-02-04 07:41:20
4|premarket_outlook|盘前分析|开盘前综合昨日分析和隔夜信息,展望今日走势|1|0 9 * * 1-5|batch|1|[1]|{}|2026-02-03 07:39:50|2026-02-03 07:55:16
5|chart_analyst|技术分析|截取 K 线图并使用多模态 AI 进行技术分析|1|0 15 * * 1-5|single|2|[1]|{}|2026-02-03 07:39:50|2026-02-03 08:16:54
sqlite> SELECT * FROM agents_configs WHERE schedule LIKE '%/60%';
Parse error: no such table: agents_configs
sqlite>
第2条记录"盘中监测"的 schedule 是 */60 * * * *,这就是导致错误的原因