Cron 故障排除
本文档的完整中文翻译正在进行中。
概述
Cron 任务的常见问题解决。
快速开始
hermes help
hermes config
hermes skills相关链接
获取帮助
如需帮助,请运行 hermes doctor 或访问 GitHub Issues。
原文档内容:
Cron Troubleshooting
When a cron job isn't behaving as expected, work through these checks in order. Most issues fall into one of four categories: timing, delivery, permissions, or skill loading.
Jobs Not Firing
Check 1: Verify the job exists and is active
hermes cron listLook for the job and confirm its state is [active] (not [paused] or [completed]). If it shows [completed], the repeat count may be exhausted — edit the job to reset it.
Check 2: Confirm the schedule is correct
A misformatted schedule silently defaults to one-shot or is rejected entirely. Test your expression:
| Your expression | Should evaluate to |
|---|---|
0 9 * * * | 9:00 AM every day |
0 9 * * 1 | 9:00 AM every Monday |
every 2h | Every 2 hours from now |
30m | 30 minutes from now |
2025-06-01T09:00:00 | June 1, 2025 at 9:00 AM UTC |
If the job fires once and then disappears from the list, it's a one-shot schedule (30m, 1d, or an ISO timestamp) — expected behavior.
Check 3: Is the gateway running?
Cron jobs are fired by the gateway's background ticker thread, which ticks every 60 seconds. A regular CLI chat session does not automatically fire cron jobs.
If you're expecting jobs to fire automatically, you need a running gateway (hermes gateway or hermes serve). For one-off debugging, you can manually trigger a tick with hermes cron tick.
Check 4: Check the system clock and timezone
Jobs use the local timezone. If your machine's clock is wrong or in a different timezone than expected, jobs will fire at the wrong times. Verify:
date
hermes cron list # Compare next_run times with local timeDelivery Failures
Check 1: Verify the deliver target is correct
Delivery targets are case-sensitive and require the correct platform to be configured. A misconfigured target silently drops the response.
| Target | Requires |
|---|---|
| `telegra... |
[完整翻译即将推出]