Skip to content

Cron running_at_ms not cleared after agentTurn run #100471

Description

@danielimtlazarus

Bug

After a cron job of kind agentTurn completes, the running_at_ms field in the cron_jobs SQLite table is not reset to 0. On the next scheduled wake, the gateway sees running_at_ms > 0, assumes the job is still running, and skips execution.

Environment

  • OpenClaw 2026.6.11
  • Node v22.22.3
  • Debian 13

Steps

  1. Create a cron with session_target: isolated and payload_kind: agentTurn at */10 * * * *
  2. Let it run once
  3. running_at_ms stays with a timestamp > 0
  4. Cron never fires again

Workaround

UPDATE cron_jobs SET running_at_ms = 0 WHERE job_id = ? + gateway restart

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions