-
Ensure memory file exists for today:
- Path: memory/YYYY-MM-DD.md
- If missing, create with minimal template
-
Check cron job health:
- Use
cron listto fetch all jobs - For each job, verify state.nextRunAtMs is in the future
- Flag jobs with consecutiveErrors > 0 or lastRunStatus != 'ok'
- Count stale/overdue jobs
- Use
-
Optional: promote learnings from recent memory files (if configured)
-
Report summary:
- Memory file: created/exists
- Cron jobs: total, healthy, stale count
- Any errors or warnings
Implementation notes:
- Use a small Node.js script to parse cron JSON and filter stale jobs
- Comparison: new Date().getTime() vs nextRunAtMs
- Consider timezone-aware scheduling
- Exit 0 if healthy; non-zero if issues found
