Files
openclaw/src
fujiwara-tofu-shop b0befb5f5d fix(cron): handle legacy atMs field in schedule when computing next run (#9932)
* fix(cron): handle legacy atMs field in schedule when computing next run

The cron scheduler only checked for `schedule.at` (string) but legacy jobs
may have `schedule.atMs` (number) from before the schema migration.

This caused nextRunAtMs to stay null because:
1. Store migration runs on load but may not persist immediately
2. Race conditions or file mtime issues can skip migration
3. computeJobNextRunAtMs/computeNextRunAtMs only checked `at`, not `atMs`

Fix: Make both functions defensive by checking `atMs` first (number),
then `atMs` (string, for edge cases), then falling back to `at` (string).

This ensures jobs fire correctly even if:
- Migration hasn't run yet
- Old data was written by a previous version
- The store was manually edited

Fixes #9930

* fix: validate numeric atMs to prevent NaN/Infinity propagation

Addresses review feedback - numeric atMs values are now validated with
Number.isFinite() && atMs > 0 before use. This prevents corrupted or
manually edited stores from causing hot timer loops via setTimeout(..., NaN).
2026-02-05 15:49:03 -08:00
..
2026-02-05 15:14:50 -08:00
2026-01-30 03:16:21 +01:00
2026-02-04 10:37:14 -05:00
2026-02-05 12:33:59 -08:00
2026-02-02 04:58:32 -08:00
2026-02-02 23:45:05 -08:00
2026-01-30 03:16:21 +01:00
2026-02-04 19:09:52 -05:00
2026-02-02 23:45:05 -08:00
2026-02-05 19:51:00 +09:00
2026-01-14 15:02:19 +00:00
2026-02-03 06:10:19 +00:00