OzBargain Monitor
Manage OzBargain cron workflows end-to-end: creation, updates, manual runs, dedupe, and delivery troubleshooting.
User-configurable profile (set these first)
- -
jobId: cron job id created for the user - INLINECODE1 : user-defined time + timezone
- INLINECODE2 : user-defined channel + destination (group/chat id)
- INLINECODE3 : user-defined priority order
- INLINECODE4 : user-defined output language
Never hardcode a specific person, group id, job id, or topic order.
Default quality rules
Keep these rules in the cron --message prompt unless the user overrides them:
- 1. Keep only high-value deals
- Keep output concise and structured
- Include per item: title, price/benefit, why worth it, direct link
- Read deal comments and include important comment-derived signals:
- expiry / sold-out / dead-deal reports
- better stacking paths (cashback + card offer + code)
- hidden constraints (new-customer only, in-store only, min-spend, exclusions)
- 5. Add a short “comment insights” note when comments provide material extra value
- If comments indicate likely expiry, label the deal as “可能过期(以楼主/最新评论为准)”
- If nothing strong appears, explicitly output a “no high-value deals today” line
- Avoid ad noise/low-value posts
Dedupe state (required)
Use a user-specific state file, e.g.:
Initial content if missing:
CODEBLOCK0
Dedup key: canonical OzBargain link (node/goto preferred).
Required behavior per run:
- 1. Read state file first
- Filter out links already in INLINECODE9
- Send only unseen links
- Append newly sent links back to
sent and save deduped state
Operations
Create a new job
CODEBLOCK1
Manual catch-up run
CODEBLOCK2
Then report whether delivery succeeded (delivered: true / deliveryStatus: delivered).
Update topic order / wording
CODEBLOCK3
Only change schedule/channel when user asks.
Change delivery destination
CODEBLOCK4
Verify status
CODEBLOCK5
Troubleshooting
If cron run succeeded but delivery failed:
- 1. Check run history error text
- Check logs for channel API errors
- Send a probe directly to destination using INLINECODE13
Common causes:
- - wrong/old destination id
- bot removed from group
- permissions/visibility restrictions
- temporary provider/API failures
Useful log grep:
CODEBLOCK6
OzBargain Monitor
端到端管理OzBargain的cron工作流:创建、更新、手动运行、去重以及投递故障排查。
用户可配置的配置文件(请先设置这些)
- - jobId:为用户创建的cron任务ID
- schedule:用户自定义的时间+时区
- delivery:用户自定义的渠道+目标(群组/聊天ID)
- topics:用户自定义的优先级顺序
- language:用户自定义的输出语言
切勿硬编码特定人员、群组ID、任务ID或主题顺序。
默认质量规则
除非用户覆盖,否则将这些规则保留在cron的--message提示中:
- 1. 仅保留高价值优惠
- 保持输出简洁且有结构
- 每项包含:标题、价格/优惠、值得购买的原因、直接链接
- 阅读优惠评论并包含重要的评论衍生信号:
- 过期/售罄/失效优惠报告
- 更好的叠加路径(返现+卡优惠+优惠码)
- 隐藏限制(仅限新用户、仅限店内、最低消费、排除项)
- 5. 当评论提供实质性额外价值时,添加简短的“评论洞察”备注
- 如果评论表明可能过期,将优惠标记为“可能过期(以楼主/最新评论为准)”
- 如果没有强力优惠,明确输出“今日无高价值优惠”一行
- 避免广告噪音/低价值帖子
去重状态(必需)
使用用户特定的状态文件,例如:
- - /home//.openclaw/workspace/data/ozbargain-sent-links.json
如果缺失,初始内容为:
json
{ sent: [] }
去重键:规范的OzBargain链接(优先使用node/goto)。
每次运行所需的行为:
- 1. 首先读取状态文件
- 过滤掉已在sent中的链接
- 仅发送未查看过的链接
- 将新发送的链接追加回sent并保存去重后的状态
操作
创建新任务
bash
openclaw cron add --name <任务名称> --cron <表达式> --tz <时区> --session isolated --announce --channel <渠道> --to <目标> --message <提示>
手动补跑
bash
openclaw cron run <任务ID>
openclaw cron runs --id <任务ID> --limit 1
然后报告投递是否成功(delivered: true / deliveryStatus: delivered)。
更新主题顺序/措辞
bash
openclaw cron edit <任务ID> --message ...
仅在用户要求时更改时间表/渠道。
更改投递目标
bash
openclaw cron edit <任务ID> --announce --channel <渠道> --to <目标>
验证状态
bash
openclaw cron list --json
openclaw cron runs --id <任务ID> --limit 5
故障排查
如果cron运行成功但投递失败:
- 1. 检查运行历史中的错误文本
- 检查日志中的渠道API错误
- 使用message.send直接向目标发送探测消息
常见原因:
- - 错误/过时的目标ID
- 机器人被移出群组
- 权限/可见性限制
- 临时提供商/API故障
有用的日志搜索:
bash
grep -n message failed\|sendMessage\|announce delivery failed\|forbidden\|chat not found /tmp/openclaw/openclaw-$(date +%F).log